Part Number Hot Search : 
1400SJ 0N60C 74AC240 BP51L12 IPC120 12D12 01031 2903108
Product Description
Full Text Search
 

To Download 101-0512 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 Smart Star (SR9000)
Modular C-Programmable Control System
User's Manual
019-0107 * 090519-L
Smart Star (SR9000) User's Manual
Part Number 019-0107 * 090519-L * Printed in U.S.A. (c) 2002-2009 Digi International Inc. * All rights reserved. No part of the contents of this manual may be reproduced or transmitted in any form or by any means without the express written permission of Digi International. Permission is granted to make one or more copies as long as the copyright page contained therein is included. These copies of the manuals may not be let or sold for any reason without the express written permission of Digi International. Digi International reserves the right to make changes and improvements to its products without providing notice.
Trademarks
Rabbit and Dynamic C are registered trademarks of Digi International Inc.
The latest revision of this manual is available on the Rabbit Web site, www.rabbit.com, for free, unregistered download.
Digi International Inc.
www.rabbit.com
Smart Star (SR9000)
TABLE OF CONTENTS
Part I. CPU/Backplane
Chapter 1. Introduction 9
1.1 Features .................................................................................................................................................9 1.2 User Connections ................................................................................................................................11 1.3 Optional Add-Ons...............................................................................................................................11 1.4 Development and Evaluation Tools....................................................................................................12 1.4.1 Tool Kit .......................................................................................................................................12 1.4.2 Software ......................................................................................................................................12 1.5 CE Compliance ...................................................................................................................................13 1.5.1 Design Guidelines .......................................................................................................................15 1.5.2 Interfacing the Smart Star to Other Devices ...............................................................................15
Chapter 2. Getting Started
17
2.1 Attach the CPU Card to the Backplane ..............................................................................................18 2.2 Connect the Power Supply..................................................................................................................19 NOTE: Notice to Customers Outside North America............................................................................................................................19 2.3 Programming Cable Connections .......................................................................................................20 2.4 Installing Dynamic C ..........................................................................................................................21 2.5 Starting Dynamic C ............................................................................................................................22 2.6 PONG.C ..............................................................................................................................................23 2.7 Installing I/O Cards.............................................................................................................................24 2.8 Where Do I Go From Here? ...............................................................................................................25
Chapter 3. Hardware Features
27
3.1 Backplane Features .............................................................................................................................28 3.1.1 Power Distribution ......................................................................................................................28 3.1.2 I/O Card Slots..............................................................................................................................31 3.2 Smart Star CPU Card Features ...........................................................................................................32 3.2.1 Serial Communication.................................................................................................................32 3.2.1.1 RS-232................................................................................................................................ 32 3.2.1.2 RS-485................................................................................................................................ 33 3.2.1.3 Programming Port .............................................................................................................. 35 3.2.1.4 Ethernet Port (SR9150 only) .............................................................................................. 36 3.3 Programming Cable ............................................................................................................................37 3.3.1 Changing Between Program Mode and Run Mode ....................................................................37 3.3.2 Memory .......................................................................................................................................38 3.3.2.1 SRAM................................................................................................................................. 38 3.3.2.2 Flash EPROM .................................................................................................................... 38 3.3.3 Other Connectors ........................................................................................................................39 3.4 Other Hardware...................................................................................................................................41 3.4.1 Clock Doubler .............................................................................................................................41 3.4.2 Spectrum Spreader ......................................................................................................................41
User's Manual
3
Chapter 4. Software
43
4.1 Running Dynamic C........................................................................................................................... 43 4.1.1 Upgrading Dynamic C................................................................................................................ 45 4.1.1.1 Patches and Bug Fixes....................................................................................................... 45 4.1.1.2 Upgrades ............................................................................................................................ 45 4.2 Sample Programs................................................................................................................................ 46 4.3 Dynamic C Libraries .......................................................................................................................... 47 4.4 Smart Star Backplane Function Calls................................................................................................. 48 4.4.1 Board Reset ................................................................................................................................ 48 4.4.2 Board Initialization ..................................................................................................................... 48 4.5 Serial Communication Calls............................................................................................................... 49
Chapter 5. Using the TCP/IP Features
51
5.1 Ethernet Connections ......................................................................................................................... 51 5.2 TCP/IP Sample Programs................................................................................................................... 53 5.2.1 How to Set IP Addresses in the Sample Programs..................................................................... 53 5.2.2 How to Set Up Your Computer for Direct Connect ................................................................... 54 5.2.3 Run the PINGME.C Demo......................................................................................................... 55 5.2.4 Additional Demo Programs........................................................................................................ 55 5.2.5 LCD/Keypad Sample Programs Showing TCP/IP Features ...................................................... 56 5.3 Where Do I Go From Here? ............................................................................................................... 57
Chapter 6. Smart Star Specifications
59
6.1 Electrical and Mechanical Specifications .......................................................................................... 60 6.1.1 Smart Star Backplane ................................................................................................................. 60 6.1.2 CPU Card.................................................................................................................................... 62 6.2 Jumper Configurations ....................................................................................................................... 64 6.3 Conformal Coating ............................................................................................................................. 66 6.4 Use of Rabbit 2000 Parallel Ports ...................................................................................................... 67 6.5 Exclusion Zone................................................................................................................................... 68
Part II. Digital I/O Cards
Chapter 7. Digital I/O Cards 71
7.1 Features .............................................................................................................................................. 71 7.2 User Interface ..................................................................................................................................... 72 7.3 User FWT Connections ...................................................................................................................... 73 7.3.1 Pinouts ........................................................................................................................................ 73 7.4 Digital Inputs and Outputs ................................................................................................................. 74 7.4.1 Digital Inputs .............................................................................................................................. 75 7.4.2 Digital Outputs ........................................................................................................................... 77 7.5 Software ............................................................................................................................................. 79 7.5.1 Sample Programs........................................................................................................................ 79 7.5.1.1 Running Sample Programs ................................................................................................ 79 7.5.2 Dynamic C Libraries .................................................................................................................. 79 7.5.3 Smart Star Digital I/O Card Function Calls ............................................................................... 80 7.6 Electrical and Mechanical Specifications .......................................................................................... 82
4
Smart Star (SR9000)
Part III. A/D Converter Cards
Chapter 8. A/D Converter Cards 87
8.1 A/D Converter Card Features .............................................................................................................87 8.2 User Interface......................................................................................................................................88 8.3 User FWT Connections ......................................................................................................................89 8.3.1 Pinouts.........................................................................................................................................89 8.4 Power Distribution ..............................................................................................................................90 8.5 Software ..............................................................................................................................................91 8.5.1 Sample Programs ........................................................................................................................91 8.5.1.1 Running Sample Programs................................................................................................. 91 8.5.2 Dynamic C Libraries ...................................................................................................................91 8.5.3 Smart Star A/D Converter Card Function Calls..........................................................................92 8.6 Electrical and Mechanical Specifications ...........................................................................................96
Part IV. D/A Converter Cards
Chapter 9. D/A Converter Cards 101
9.1 D/A Converter Card Features ...........................................................................................................101 9.2 User Interface....................................................................................................................................102 9.3 User FWT Connections ....................................................................................................................104 9.3.1 Pinouts.......................................................................................................................................104 9.4 Power Distribution ............................................................................................................................105 9.5 Software ............................................................................................................................................106 9.5.1 Sample Programs ......................................................................................................................106 9.5.1.1 Running Sample Programs............................................................................................... 106 9.5.2 Dynamic C Libraries .................................................................................................................106 9.5.3 Smart Star D/A Converter Card Function Calls........................................................................107 9.6 Electrical and Mechanical Specifications .........................................................................................113
Part V. Relay Cards
Chapter 10. Relay Cards 117
10.1 Relay Card Features........................................................................................................................117 10.2 User Interface..................................................................................................................................118 10.3 User FWT Connections ..................................................................................................................119 10.3.1 Pinouts.....................................................................................................................................119 10.4 Power Distribution ..........................................................................................................................120 10.5 Relay Cards Software .....................................................................................................................121 10.5.1 Sample Programs ....................................................................................................................121 10.5.2 Running Sample Programs......................................................................................................121 10.5.3 Dynamic C Libraries ...............................................................................................................121 10.5.4 Smart Star Relay Card Function Calls ....................................................................................122 10.6 Electrical and Mechanical Specifications .......................................................................................123
User's Manual
5
Part VI. Appendices
Appendix A. Field Wiring Terminals 127
A.1 Selecting and Installing a Field Wiring Terminal ........................................................................... 128 A.2 Dimensions...................................................................................................................................... 129
Appendix B. LCD/Keypad Module
131
B.1 Specifications................................................................................................................................... 131 B.2 Contrast Adjustments for All Boards .............................................................................................. 133 B.3 Keypad Labeling.............................................................................................................................. 134 B.4 Header Pinouts................................................................................................................................. 135 B.4.1 I/O Address Assignments ........................................................................................................ 135 B.5 Mounting LCD/Keypad Module ..................................................................................................... 136 B.5.1 Installation Guidelines ............................................................................................................. 136 B.5.2 Mounting Instructions.............................................................................................................. 137 B.5.2.1 Bezel-Mount Installation................................................................................................. 137 B.6 Connecting LCD/Keypad Module to Smart Star Backplane........................................................... 139 B.7 Sample Programs............................................................................................................................. 141 B.8 LCD/Keypad Module Function Calls.............................................................................................. 143 B.8.1 LEDs ........................................................................................................................................ 143 B.8.2 LCD Display ............................................................................................................................ 144 B.8.3 Keypad ..................................................................................................................................... 160 B.9 Font and Bitmap Converter ............................................................................................................. 163
Appendix C. Power Management
165
C.1 Current Requirements...................................................................................................................... 166 C.2 Batteries and External Battery Connections.................................................................................... 166 C.2.1 Replacing the Backup Battery ................................................................................................. 167 C.2.2 Battery-Backup Circuit ............................................................................................................ 167 C.2.3 Power to VRAM Switch .......................................................................................................... 168 C.2.4 Reset Generator........................................................................................................................ 169 C.2.5 External Battery ....................................................................................................................... 170 C.3 Chip Select Circuit........................................................................................................................... 171
Appendix D. Smart Star Slot Address Layout
D.1 D.2 D.3 D.4
173
Digital I/O Card Channel Layout .................................................................................................... 175 A/D Converter Card Channel Layout.............................................................................................. 176 D/A Converter Card Channel Layout.............................................................................................. 177 Relay Card Channel Layout ............................................................................................................ 178
Index Schematics
179 183
6
Smart Star (SR9000)
PART I. CPU/BACKPLANE
User's Manual
7
CPU/BACKPLANE
CPU/BACKPLANE
Smart Star (SR9000)
1. INTRODUCTION
Chapter 1 introduces the Smart Star embedded control system and describes the features associated with the backplane chassis and the CPU Card. The Tool Kit containing the hardware essentials to begin using the Smart Star is described, and the software highlights are presented.
The Smart Star is a modular and expandable embedded control system whose configuration of Digital I/O, A/D Converter, D/A Converter, and Relay Cards can be tailored to a large variety of demanding real-time control and data acquisition applications. The typical Smart Star system consists of a rugged backplane with a built-in voltage regulator, a CPU Card, and one or more I/O cards. The CPU Card plugs into a designated slot on the backplane chassis, which has additional slots available for any combination of I/O cards. A high-performance Rabbit 2000 microprocessor on the CPU Card operates at 22.1 MHz to provide fast data processing.
1.1 Features
* C-programmable to create a custom user interface * Flexible functionality--modular configuration allows interchanging or replacing individual I/O cards * Expandable--up to 168 I/O ports * Choice of two backplanes--with either 3 or 7 slots for I/O cards * Choice of CPU cards--with or without one RJ-45 10/100-compatible Ethernet port with 10Base-T Ethernet interface * RS-232 and RS-485 serial ports allow networking to other Smart Star units, singleboard computers, or enterprise computing centers * 128K SRAM and 512K flash memory, optional 512K SRAM * Real-time clock * Watchdog supervisor * Backup battery * Optional backlit 122 x 32 graphic display/keypad module * RabbitLink Ethernet gateway available for remote download/debug, Web serving, and e-mail
User's Manual 9
CPU/BACKPLANE
CPU/BACKPLANE
Table 1 lists the backplanes, CPU cards, and the I/O cards that are available for the Smart Star control system. Appendix A provides detailed specifications for the Smart Star backplanes and the CPU cards.
Table 1. Smart Star Backplanes and Cards
Card Model SR9010 Backplane SR9050 SR9150 CPU SR9160 SR9200 SR9210 SR9220 Digital I/O SR9205 SR9215 SR9225 I/O Cards SR9300 A/D Converter SR9310 SR9320 SR9400 D/A Converter SR9410 SR9420 SR9500 Relay SR9510 16 digital inputs, 8 digital sourcing outputs 8 digital inputs, 16 digital sourcing outputs 8 digital inputs, 8 digital sourcing outputs 12-bit A/D converter, 11 channels, 0 V - 10 V 12-bit A/D converter, 11 channels, -10 V - +10 V 12-bit A/D converter, 11 channels, 4 mA - 20 mA 12-bit D/A converter, 8 channels, 0 V - 10 V 12-bit D/A converter, 8 channels, -10 V - +10 V 12-bit D/A converter, 8 channels, 4 mA - 20 mA 5 SPST relays and 1 SPDT relay, each protected with onboard snubbers 8 SPDT relays (no snubbers) Full-featured CPU card without RJ-45 Ethernet port 16 digital inputs, 8 digital sinking outputs 8 digital inputs, 16 digital sinking outputs 8 digital inputs, 8 digital sinking outputs 3 I/O card slots, 1 CPU card slot, header connections for optional LCD/keypad module Full-featured CPU card with RJ-45 Ethernet port Features 7 I/O card slots, 1 CPU card slot, header connections for optional LCD/keypad module
10
Smart Star (SR9000)
1.2 User Connections
Connections to the I/O cards are made via a ribbon cable connector or optional field wiring terminals that are either pluggable or have screw terminals. Three different Field Wiring Terminals (FWTs) are available. Table 2 lists the I/O cards and the Rabbit part numbers for the corresponding FWTs.
Table 2. Guide to FWT Selection
Rabbit Part Number Pluggable Terminals FWT Description I/O Cards Screw Terminals
FWT27 FWT18 FWT18R
Digital I/O Relay (SR9510) A/D Converter D/A Converter Relay (SR9500)
101-0420 101-0421 101-0422
101-0514 101-0515 101-0516
NOTE: Appendix A, "Field Wiring Terminals," provides further information on FWTs, including their dimensions.
1.3 Optional Add-Ons
The LCD/keypad module is the only available optional add-on. Further details on the LCD/keypad module are provided in Appendix B. Visit our Web site for up-to-date information about additional add-ons and features as they become available. The Web site also has the latest revision of this user's manual.
User's Manual
11
CPU/BACKPLANE
CPU/BACKPLANE
1.4 Development and Evaluation Tools
1.4.1 Tool Kit The Tool Kit has the hardware essentials that you need to create and use your own Smart Star control system. The items in the Tool Kit and their use are as follows: * Smart Star (SR9000) Getting Started instructions. * Dynamic C CD-ROM, with complete product documentation on disk. * Programming cable, used to connect your PC serial port to the Smart Star CPU Card to write and debug C programs that run on the Smart Star control system. * FWT27 pluggable field wiring terminal. * Screwdriver. * DC power supply, used to power the backplane, which in turn supplies power to the CPU card and the I/O cards. The DC power supply accepts an AC input of 100 V to 240 V at up to 0.6 A, and delivers a DC output up to 1.1 A at 24 V. * Rabbit 2000 Processor Easy Reference poster. * Registration card. 1.4.2 Software The Smart Star control system is programmed using Rabbit's Dynamic C. A compatible version is included on the Tool Kit CD-ROM. Rabbit also offers add-on Dynamic C modules containing the popular C/OS-II real-time operating system, as well as PPP, Advanced Encryption Standard (AES), and other select libraries. In addition to the Web-based technical support included at no extra charge, a one-year telephone-based technical support module is also available for purchase. Visit our Web site at www.rabbit.com or contact your Rabbit sales representative or authorized distributor for further information.
12
Smart Star (SR9000)
1.5 CE Compliance
Equipment is generally divided into two classes.
CLASS A Digital equipment meant for light industrial use Less restrictive emissions requirement: less than 40 dB V/m at 10 m (40 dB relative to 1 V/m) or 300 V/m CLASS B Digital equipment meant for home use More restrictive emissions requirement: 30 dB V/m at 10 m or 100 V/m
These limits apply over the range of 30-230 MHz. The limits are 7 dB higher for frequencies above 230 MHz. Although the test range goes to 1 GHz, the emissions from Rabbit-based systems at frequencies above 300 MHz are generally well below background noise levels. The CPU card, I/O cards, and backplane in the Smart Star embedded control system have been tested and were found to be in conformity with the following applicable immunity and emission standards as described in Table 3.
Table 3. CE Compliance of Smart Star Backplanes and Cards
Card Model Description 7 I/O card slots, 1 CPU card slot, header connections for optional LCD/keypad module* 3 I/O card slots, 1 CPU card slot, header connections for optional LCD/keypad module* 22.1 MHz CPU card with Ethernet Used for CE Compliance Testing Full-featured
SR9010 Backplane SR9050 SR9150 CPU SR9160 SR9200 Digital I/O SR9205 SR9210 SR9220 I/O Cards SR9300 A/D Converter SR9310 SR9320 SR9500 Relay SR9510
x
Sub-version Full-featured
x x x
22.1 MHz CPU card without Ethernet Sub-version 16 inputs, 8 sinking outputs 16 inputs, 8 sourcing outputs 8 inputs, 16 sinking outputs 8 inputs, 8 sinking outputs Eleven 12-bit analog inputs (0-10 V) Eleven 12-bit analog inputs (10 V) Full-featured Full-featured Sub-version Sub-version Sub-version Full-featured
x
Eleven 12-bit analog inputs (4-20 mA) Sub-version 5 SPST relays and 1 SPDT relay, each Full-featured protected with onboard snubbers 8 SPDT relays (no snubbers) Full-featured x
x
* No CE compliance testing was done with the LCD/keypad module connected to a Smart Star embedded control system. A system consisting of Smart Star boards and an LCD/keypad module therefore cannot be considered to be CE-compliant.
User's Manual 13
CPU/BACKPLANE
CPU/BACKPLANE
The sub-versions of the boards are also CE-compliant. All boards that are CE-compliant have the CE mark. Several Smart Star boards are not yet CE-compliant. These boards are listed in Table 4.
Table 4. Smart Star Backplanes and Cards Not CE-Compliant
Card Backplane CPU Model SR9000 SR9100 SR9400 D/A Converter SR9410 SR9420 Description 7 I/O card slots, 1 CPU card slot 25.8 MHz CPU card Eight analog outputs (0-10 V) Eight analog outputs (10 V) Eight analog outputs (4-20 mA) Passed emissions tests, immunity tests pending Comments Legacy product Legacy product
Immunity The CE-compliant Smart Star boards meet the following EN55024/1998 immunity standards. * EN61000-4-3 (Radiated Immunity) * EN61000-4-4 (EFT) * EN61000-4-6 (Conducted Immunity) Additional shielding or filtering may be required for a heavy industrial environment. Emissions The CE-compliant Smart Star boards meet the following emission standards when used with a Smart Star embedded control system that contains a Rev. C or higher version of the Rabbit 2000 microprocessor with its spectrum spreader turned on and set to the normal mode. This microprocessor is used in all Smart Star CPU boards that carry the CE mark. * EN55022:1998 Class A * FCC Part 15 Class A
NOTE: The Smart Star embedded control system satisfied the Class A limits but not the Class B limits. Such equipment need not be restricted in its sale, but the following warning must be included in the instructions for its use.
Warning This is a class A product. In a domestic environment this product may cause radio interference, in which case the user may be required to take adequate measures.
Additional shielding or filtering may be needed to meet Class B emissions standards.
14
Smart Star (SR9000)
1.5.1 Design Guidelines Note the following requirements for incorporating a Smart Star embedded control system into your application to comply with CE requirements. General * The power supply provided with the Tool Kit is for development purposes only. It is the customer's responsibility to provide a CE-compliant power supply for the end-product application. * When connecting the Smart Star embedded control system to outdoor cables, the customer is responsible for providing CE-approved surge/lighting protection. * Rabbit recommends placing digital I/O or analog cables that are 3 m or longer in a metal conduit to assist in maintaining CE compliance and to conform to good cable design practices. * When installing or servicing the Smart Star embedded control system, it is the responsibility of the end-user to use proper ESD precautions to prevent ESD damage to the Smart Star. Safety * All inputs and outputs to and from the Smart Star embedded control system must not be connected to voltages exceeding SELV levels (42.4 V AC peak, or 60 V DC). * The lithium backup battery circuit on the CPU card in the Smart Star embedded control system has been designed to protect the battery from hazardous conditions such as reverse charging and excessive current flows. Do not disable the safety features of the design. 1.5.2 Interfacing the Smart Star to Other Devices Since Smart Star embedded control systems are designed to be connected to other devices, good EMC practices should be followed to ensure compliance. CE compliance is ultimately the responsibility of the integrator. Additional information, tips, and technical assistance are available from your authorized Rabbit distributor, and are also available on our Web site at www.rabbit.com.
User's Manual
15
CPU/BACKPLANE
CPU/BACKPLANE
16
Smart Star (SR9000)
2. GETTING STARTED
Chapter 2 explains how to connect the power supply to the Smart Star backplane, how to install the CPU Card on the backplane, and how to connect the programming cable to the CPU Card. Once you run a sample program to demonstrate that you have connected everything correctly, you will be ready to go on to install I/O cards and finish developing your system.
User's Manual
17
CPU/BACKPLANE
CPU/BACKPLANE
2.1 Attach the CPU Card to the Backplane
1. Orient the backplane with the PROCESSOR SLOT facing away from you as shown in Figure 1.
J3
C19
C23
C24
C25 U10 C27 C28 C26 J7 J6
Y1 R5 C4 C7 R2
R11
R17 C18
C11 R12
Align facing edge of CPU card with back edge of alignment hole
RT1
C1 C2
R4 C3 R1 R3 U3
R14
D1
D2 Y2
C8
R13 C10
PROCESSOR SLOT PROCESSOR SLOT
SLOT 0
SLOT 1
SLOT 2
LIN
SLOT 3
SLOT 4
Align facing edge of CPU card with back edge of alignment hole
SLOT 5
SLOT 6
Figure 1. Attach the CPU Card to the Backplane
2. Position the CPU Card above the backplane as shown in Figure 1. 3. Carefully insert the CPU Card header into the PROCESSOR SLOT on the backplane and line up the facing edge of the CPU Card with the back edge of the alignment holes on the backplane as shown in Figure 1.
NOTE: Be careful to line up the pins on the CPU Card with the socket on the backplane when installing the CPU Card. The CPU Card can be damaged once power is applied if the CPU Card is not installed correctly.
4. Use the two 4-40 screws supplied with the CPU Card to anchor the plastic brackets so that they hold the CPU Card firmly in place on the backplane.
18 Smart Star (SR9000)
C36
R4 +
PWR
C37
USER +RAW
C6
GND
3
POWER IN
JP1 U6
GND
C12
J4
R20 C17
C35
C46
C49
J4 C53
C22
U8 RP4 C15
C30 R33 R32
U14
U1
C21 U9 Y3
C31
C36
C41 D3
J8
C16 J5
C32
R34
J5
R23 R26 Q1 Q3
D5
C40
C33
R41 R39
C13
R42
R21 BT1
Battery
DS1
25
51
1 26 2
C14 C13
R1
J1
J
52
U3
C U3 7
C15 U4 C8
L3 R3
2
1
D1
C4
J10
J3
TVS
C17 C19
C16
D3
1 U2 D4 L2
J4
C20 C22
C U6 10 R9
C5
+
J5
U5 C9
C23
D3
K RC ACT L M NK
J6
C26
C25
A CPUCT
R2
JP1
J7
C28 C29 C31
J8
C32
RN
1
R5
J9
C35 C35
C34 C34
2.2 Connect the Power Supply
Connect the power supply to the POWER IN connector on the backplane--the red (positive) wire to +RAW and the black (negative) wire to GND, as shown in Figure 2.
Notice to Customers Outside North America
The power supply included with the Smart Star Tool Kit may be used worldwide. Customers outside North America simply need to exchange the line cord and plug from the power supply to their wall outlet with one available locally. 1. To exchange the line cord and plug, first remove the existing line cord. To access the screws, use a screwdriver to gently lift up and remove the plastic insulating cover.
CPU Board
L1
SR9010
SR9050
V_USER +RAW
GND
TVS1
C14
R6
To Smart Star POWER IN
Black Red Jumper
To Smart Star power supply
USER +RAW GND
3
PWR
To wall outlet
V ADJ V +V
LN
(AC)
PWR 1
USER +RAW GND
3
Plastic Insulating Cover
Figure 3. Power Supply Connections (overseas)
1
2.Unscrew the wires at the ground, L, and N terminals. 3.Attach the line cord that you obtained locally to the power supply. Be sure to follow any color-coding conventions, for example, green/yellow to ground, brown to L, and blue to N terminals. 4.Ensure that the wires are attached securely and are not touching each other. Snap on the plastic insulating cover. NOTE: The power supply included with the Smart Star Tool Kit is intended for development purposes only.
Figure 2. Power Supply Connections (North America)
NOTE: Be careful to hook up the positive and negative leads exactly as described. Only the +5 V circuitry is protected against reverse polarity.
A USER connection is supplied on the backplane to allow an independent power supply to be used for future development. For now, use a wire jumper to connect USER to +RAW so that they share the same power supply.
User's Manual
19
CPU/BACKPLANE
DS1
POWER IN
J1
C12
POWER IN
DS1
J1
25
51
1
J2
26
52
2
C14 C13
D1
C2 C1 D2 R3
PROCESSOR SLOT
C15 L2
J1
CPU/BACKPLANE
2.3 Programming Cable Connections
1. Connect the programming cable to the CPU Card. Connect the 10-pin PROG connector of the programming cable to header J2 on the CPU Card as shown in Figure 4. Connect the other end of the programming cable to a COM port on your PC. Note that COM1 on the PC is the default COM port in the Dynamic C installation.
NOTE: Be sure to use the programming cable (Part No. 101-0513) supplied with the Smart Star Tool Kit--the programming cable has red shrink wrap around the RS-232 converter section located in the middle of the cable. Programming cables from other Rabbit kits are not designed to work with the Smart Star.
DIAG
Diagnostic connector
Red shrink wrap
To PC COM port
Colored side towards pin 1
PROG
Programming connector Pin 1
J3 C19 C23
C24
C25 U10 C27 C28 C26 J7 J6
Y1 R5 C4 C7 R2
R11
R17 C18
C11 R12
C1 C2
RT1
R4 C3 R1 R3 U3
R14
D1
D2 Y2
C8
R13 C10
Figure 4. Programming Cable Connections
NOTE: Never disconnect the programming cable by pulling on the ribbon cable. Carefully pull on the connector to remove it from the header. NOTE: Some PCs now come equipped only with a USB port. It may be possible to use an RS-232/USB converter (Part No. 20-151-0178) with the programming cable supplied with the Tool Kit. Note that not all RS-232/USB converters work with Dynamic C.
20
JP1 U6
GND
C12
J4
R20 C17
C35
C46
C49
J4 C53
C22
U8 RP4 C15
C30 R33 R32
U14
U1
C21 U9 Y3
C31
C36
C41 D3
J8
C16 J5
C32
R34
J5
R23 R26 Q1 Q3
D5
C40
C33
R41 R39
C13
R42
R21 BT1
Battery
Smart Star (SR9000)
2. Apply power. Plug the power supply in to a nearby outlet. The CPU Card is now ready to be used.
NOTE: A hardware RESET is accomplished by unplugging the power supply, then plugging it back in.
To power down the SmartStar, unplug the power supply. You should disconnect power before making any circuit adjustments or changing any connections to the SmartStar.
User's Manual
21
CPU/BACKPLANE
CPU/BACKPLANE
2.4 Installing Dynamic C
If you have not yet installed Dynamic C version 7.06P3 (or a later version), do so now by inserting the Dynamic C CD from the Smart Star Tool Kit in your PC's CD-ROM drive. The CD will auto-install unless you have disabled auto-install on your PC. If the CD does not auto-install, click Start > Run from the Windows Start button and browse for the setup.exe file on your CD drive. Click OK to begin the installation once you have selected the setup.exe file. The online documentation is installed along with Dynamic C, and an icon for the documentation menu is placed on the workstation's desktop. Double-click this icon to reach the menu. If the icon is missing, create a new desktop icon that points to default.htm in the docs folder, found in the Dynamic C installation folder. The latest versions of all documents are always available for free, unregistered download from our Web sites as well. The Dynamic C User's Manual provides detailed instructions for the installation of Dynamic C and any future upgrades.
NOTE: If you have an earlier version of Dynamic C already installed, the default installation of the later version will be in a different folder, and a separate icon will appear on your desktop.
22
Smart Star (SR9000)
2.5 Starting Dynamic C
Once the CPU Card is installed and connected as described above, start Dynamic C by double-clicking on the Dynamic C icon or by double-clicking on dcrab_XXXX.exe in the
Dynamic C root directory, where XXXX are version-specific characters.
Dynamic C defaults to using the serial port on your PC that you specified during installation. If the port setting is correct, Dynamic C should detect the CPU Card and go through a sequence of steps to cold-boot the CPU Card and to compile the BIOS. (Some versions of Dynamic C will not do the initial BIOS compile and load until the first time you compile a program.) If you receive the message No Rabbit Processor Detected, the programming cable may be connected to the wrong COM port, a connection may be faulty, or the target system may not be powered up. First, check both ends of the programming cable to ensure that it is firmly plugged into the PC and the programming port. If there are no faults with the hardware, select a different COM port within Dynamic C. From the Options menu, select Communications. Select another COM port from the list, then click OK. Press to force Dynamic C to recompile the BIOS. If Dynamic C still reports it is unable to locate the target system, repeat the above steps until you locate the active COM port. You should receive a Bios compiled successfully message once this step is completed successfully. If Dynamic C appears to compile the BIOS successfully, but you then receive a communication error message when you compile and load a sample program, it is possible that your PC cannot handle the higher program-loading baud rate. Try changing the maximum download rate to a slower baud rate as follows. * Locate the Serial Options dialog in the Dynamic C Options > Communications menu. Select a slower Max download baud rate. If a program compiles and loads, but then loses target communication before you can begin debugging, it is possible that your PC cannot handle the default debugging baud rate. Try lowering the debugging baud rate as follows. * Locate the Serial Options dialog in the Dynamic C Options > Communications menu. Choose a lower debug baud rate.
User's Manual
23
CPU/BACKPLANE
CPU/BACKPLANE
2.6 PONG.C
You are now ready to test your set-up by running a sample program. Find the file PONG.C, which is in the Dynamic C SAMPLES folder. To run the program, open it with the File menu (if it is not still open), compile it using the Compile menu, and then run it by selecting Run in the Run menu. The STDIO window will open and will display a small square bouncing around in a box. This program does not test the serial ports on the CPU Card, but does ensure that the CPU is basically functional.
24
Smart Star (SR9000)
2.7 Installing I/O Cards
1. Orient the backplane with the CPU Card already installed and facing towards you as shown in Figure 5.
Q20 C
Q21
D27 D26 D25 D24 D23 D22 D21 R40 R39 R38 R37 R43 R42 R41
D20 R36
Q28 C
C3 4
C3 5
R5
J9
USER
RCM
ACT LNK
ACT
CPU
LNK
PWR DS1
ETX_CT ERX_CT TX_CT TPOUT+ TPOUT TPIN+ TPIN RX_CT
J8
JACK
C2 8
DS5 DS4
DS6
DS3
DS2 R25 R24 R18
R30
R29
R28
R22
R19
C52
C50 R44 L1
C39
C38
TP2
RN2 R16 R16
J5 R10
R35 Q7 R37
C5
Q4
C14
SRAM
U6 C10
C20
+
R9
U2 C5
C42
L2
C51
RP2
D4
J4
Q6
R31 JP5
JP3
R7 RP1
C6
R38
U5
D3
S1
C1 6
C1 7
TVS1 R4 + 1
D6
TP3
U11
C4
J3
D4
R3
JP2
2
U4 C8
L3
C36
C37
C1 3
C1 4
C U3 7
J10
JP4
52
26
R1
J1
1
PWR
3
POWER IN
DS
To power supply
Figure 5. Installing I/O Cards on the Backplane
2. Position the new I/O card above the backplane over any unused slot position (SLOT 0 to SLOT 6) as shown in Figure 5. Note the slot number and the type of I/O card since Dynamic C addresses the I/O cards by slot number. 3. Carefully insert the I/O card header into the slot on the backplane and line up the tabs on the I/O cards with the slots on the backplane as shown in Figure 5. 4. Use the two 4-40 screws supplied with the I/O card to anchor the plastic brackets on the CPU Card or the I/O card firmly on the backplane. Tighten the screws as needed using a Phillips screwdriver whose shaft is at least 3" (7 cm) long, but is no thicker than 0.16" (4 mm).
User's Manual 25
25
PROCESSOR SLOT
USER
+RAW
51
USER +RAW GND
1
GND
J
2
SLOT 0
C48
TV
U2
C29
Flash EPROM
Flash EPROM
SLOT 1
C1 9
C2 0
U5
RP3
SLOT 2
C9
U5
R9
C2 2
C2 3
R36
Q5
U7
C9
U4
RN1
TP1
Note: The plastic brackets on the CPU card are attached on the opposite side of the board relative to the I/O cards.
LIN
R40
C37
C34
R43
C44
J6
Q2
SLOT 3
C2 5
C2 6
U12
CPU Card
R27
J7
C2 9
C45
K RC A C T M LN K A CP C T U
C47
R2
JP1
2
SERIAL
SLOT 5
CPU Card
RCM TxC RxC C43
C3 1
SLOT 4
C3 2
TxD
RxD
GND
+ RS-485
RN 1
SLOT 6 SLOT 6
Place tabs on card into alignment slot
C BE R27Q27 C27 R35
C BE Q35 C35
D35
D34 D33 D32 D31 D30 D29 D28 JP2 JP3 R60 C44 C36 R52 R44 R68 R69 R70 R71 R72 R73 R49 R50 R74 R75 R67 C51 C43 R59 R51
Q26
Q34
Tip: It's easier to install the plastic brackets when you install I/O cards starting from the slot furthest away from the CPU card. You may have to remove the CPU card to install the brackets on the I/O card in SLOT 0.
I/O Card
R20 C20 R28 C28
JP1 R21
Q22
Q23
Q25
Q24
R25
Q33
Q32
Q31
Q30
Q29
2
CPU/BACKPLANE
CPU/BACKPLANE
2.8 Where Do I Go From Here?
NOTE: If you purchased your Smart Star through a distributor or Rabbit partner, contact the distributor or partner first for technical support.
If there are any problems at this point: * Use the Dynamic C Help menu to get further assistance with Dynamic C. * Check the Rabbit Technical Bulletin Board at www.rabbit.com/support/bb/. * Use the Technical Support e-mail form at www.rabbit.com/support/. If the sample program ran fine, you are now ready to go on to install I/O cards, explore other Smart Star features, and develop your own applications. Chapter 3, "Hardware Features," provides detailed information about the CPU Card, and how to install the I/O cards. Be sure to take the total current consumption of the individual cards into account when selecting a power supply. Appendix C.1, "Current Requirements," provides more detailed information. Chapter 4, "Software," describes the Dynamic C software libraries and introduces some sample programs for use with the CPU Card. Chapter 6, "Smart Star Specifications," provides specifications for the backplanes and the CPU cards, including mounting and clearance recommendations. Separate sections in this manual have been prepared for the various I/O cards, and include complete information about their pinouts and Dynamic C software libraries, including sample programs. Once you have developed your application and bench-tested the finished system, you may install the finished system.
26
Smart Star (SR9000)
3. HARDWARE FEATURES
Chapter 3 describes the principal features for the Smart Star backplanes and CPU cards.
* Power Distribution - Power Distribution - I/O Card Slots * Smart Star CPU Card Features - Serial Communication - Memory - Other Connectors
User's Manual
27
CPU/BACKPLANE
CPU/BACKPLANE
3.1 Backplane Features
3.1.1 Power Distribution Power is supplied to the Smart Star control system from an external source through header J1 on the backplane. The +5 V circuitry on the Smart Star control system is protected against reverse polarity by a Schottky diode as shown in Figure 6.
+V_USER J1 +RAW
1 2 3
POWER IN
SWITCHING VOLTAGE REGULATOR
+5 V
Figure 6. Smart Star Control System Power Supply Schematic
A capacitor provides surge current protection for the voltage regulator, and allows the external power supply to be located some distance away from the Smart Star control system. A switching power regulator is used. The +RAW input voltage may range from 9 V to 30 V (15 V to 30 V you plan to use a D/A Converter Card). The backplane has inputs for two separate power supplies on header J1, +RAW and V_USER. The +RAW power supply goes to the switching power regulator, which outputs the +5 V DC used by the CPU Card and by the I/O cards plugged into the backplane. The V_USER connection allows a different voltage to be available on the I/O cards for future development.
NOTE: Always connect V_USER to +RAW with a jumper wire between terminals 1 and 2 on header J1 for the development activities described in the Smart Star manuals.
28
Smart Star (SR9000)
Figure 7 shows how the power supplies are distributed on the backplane and on the CPU Card.
Power In
24 V DC power supply included in Tool Kit
SLOT 0 6
+RAW
+RAW 930 V DC
+5 V switching regulator
Jumper
+5 V
20
Optional power supply (for future use)
V_USER 930 V DC
+V_USER
22 1, 26
(a) Backplane
PROCESSOR SLOT
20
+5 V
Backup Battery J4 J5 CPU logic, memory
3 V DC VRAM
22
+V_USER +RAW
SRAM, CPU, RTC
51 1, 26, 52
(b) CPU Card
Figure 7. Smart Star Power Supplies--Backplane and CPU Card
User's Manual
29
CPU/BACKPLANE
CPU/BACKPLANE
Figure 8 shows how the power supplies are distributed on the I/O cards.
+5 V +RAW +V_USER K
Multiplexer/Latch High-Voltage Outputs
(user-selectable)
Relay Coils Multiplexer/Latch
Digital I/O
Multiplexer/Latch Voltage Regulators/ A/D Reference Voltage Multiplexer/Latch Voltage Regulators: 12 V
Relay
A/D Converter
D/A Converter
Figure 8. Smart Star Power Distribution on I/O Cards
NOTE: Note that Rabbit recommends tying +RAW to +V_USER as explained in Section 2.2, "Connect the Power Supply."
The user has the option of using a separate power supply to K when configuring the highpower outputs for the digital I/O cards. The connection to K is through the user interface on the digital I/O card. Further details are provided in Chapter 7, "Digital I/O Cards."
30
Smart Star (SR9000)
3.1.2 I/O Card Slots The backplane serves to make the CPU Card accessible to up to seven I/O cards plugged in to SLOT 0 through SLOT 6 on the backplane. Figure 9 shows the pinout for SLOT 0 through SLOT 6 (headers J3-J9) on the backplane.
J3J9
GND D1 D3 D5 D7 A1 A3 /IOWR INHIB_OUT /RESET NC TX SCLK D0 D2 D4 D6 A0 A2 /IORD /SELECT /ATTN1 +5 V +V_USER RX GND
Figure 9. Pinout for SLOT 0 Through SLOT 6 (Headers J3-J9) on the Backplane
NOTE: The SR9050 backplane can accommodate up to three I/O cards plugged in to
SLOT 0
through SLOT 2 (headers J3-J5).
User's Manual
31
CPU/BACKPLANE
CPU/BACKPLANE
3.2 Smart Star CPU Card Features
3.2.1 Serial Communication The CPU Card has one screw terminal header for RS-232/RS-485 serial communication (J3) and one RJ-45 Ethernet jack (J7, SR9150 only). The RJ-12 jack, J6, is reserved for future use and therefore has no signals. The pinouts are shown in Figure 10.
FD RS-485/3-wire RS-232
J3
RS-485+ RS-485 GND GND RXC TXC
Mode 0:
Mode 1: two 3-wire RS-232
J3
RXD RXC
Mode 2: one 5-wire RS-232
J3
GND RXC 2
TXD
TXC
CTS
7
6
5
4
3
2
1
7
6
5
4
3
2
1
7
6
5
4
3
J3
J6
J7
Figure 10. Smart Star CPU Card Serial Pinout
The factory default for the CPU Card is one RS-232 (3-wire) and one RS-485 serial channel, corresponding to Mode 0 in Figure 10. The other modes shown in Figure 10 are set in software via the Dynamic C serMode function call (see Section 4.5, "Serial Communication Calls").
3.2.1.1 RS-232
The CPU Card's RS-232 serial channel is connected to an RS-232 transceiver. The transceiver provides the voltage output, slew rate, and input voltage immunity required to meet the RS-232 serial communication protocol. Basically, the chip translates the Rabbit 2000's 0 V to +Vcc signals to RS-232 signal levels. Note that the polarity is reversed in an RS-232 circuit so that +5 V is output as approximately -10 V and 0 V is output as approximately +10 V. The transceiver also provides the proper line loading for reliable communication. The maximum baud rate is 115,200 bps. RS-232 can be used effectively at this baud rate for distances up to 15 m. The Rabbit 2000 serial port C TXD and RXD signals are presented either as RS-232 TX and RX or as RTS/CTS handshaking, depending on the mode selected with the Dynamic C function serMode. The RS-232 signals are available on screw terminal header J3.
32
Smart Star (SR9000)
TXC 1
RTS
3.2.1.2 RS-485
The CPU Card has one RS-485 serial channel, which is connected to the Rabbit 2000 serial port C through an RS-485 transceiver. The chip's slew rate limiters provide for a maximum baud rate of 250,000 bps, and allows networking over a distance of up to 300 m (or 1000 ft.). The half-duplex communication uses the Rabbit 2000's PD4 pin to control the data enable on the communication line. The RS-485 signals are available on the CPU Card through screw terminal header J3. The Smart Star control system can be used in an RS-485 multidrop network. Connect the 485+ to 485+ and 485- to 485- using single twisted-pair wires on the CPU Card's header J4 as shown in Figure 11. Note that a common ground is recommended.
Ground recommended
J3
C19
C23
C24
U6
C26 J7
U6
C26 J7
Y1 R5 C4 C7 R2
R11
R17 C18
J4
R20 C17 J4 C22 U8 RP4 C30
C35
C46
C49 R5 C4 C7 C53 C1 C2 U14 R2
Y1
R17 C18
J4
R20 C17 J4 C22 U8 RP4 C30
C35
C46
C49 R5 C4 C7 C53 C1 C2 U14 R2
C11 R12
R11
C11 R12
C1 C2
C15
C15
U1
C21 U9 Y3
C31
C36
U1 C41 D3 J8
C21 U9 Y3
C31
C36
C41 D3
J8
RT1
R4 C3 R1 R3 U3 R14 D1 D2 Y2 C8 C10 C13
C16 J5
C32
J5
R23 R26 Q1 Q3
D5 C40
RT1
R4 C3 R1 R3 U3 R14
C16 J5
C32
C33
J5
R23 R26 Q1 Q3
D5 C40
RT1
R4 C3 R1 R3 U3 R14
C33
R42
R13
D1
D2 Y2 C8
C13
R42 D1
R13 C10
R21 BT1
R21 BT1
Y2 C8
Battery
Battery
Figure 11. Multidrop Smart Star Network
User's Manual
GND
GND
J6
J6
Y1
R17 C18
R11
C11 R12
D2
R13 C10
JP1
JP1
C25 U10 C27 C28
J3
C19
C23
C24
C25 U10 C27 C28
J3
C19
C23
C24
C25 U10 C27 C28 C26 J7 J6
U6
J4
R20 C17 J4 C22 U8 RP4 C30
C35
C46
C49
C53
C15 U14 R33
U1
C21 U9 Y3
C31
C36
C41 D3
J8
C16 J5
C32
J5
R23 R26 Q1 Q3
D5 C40
C33
C13
R42
R21 BT1
Battery
33
CPU/BACKPLANE
JP1
GND
C12
R33
R33
R32
R32
R32
R34
R34
R34 R41 R39
R41 R39
R41 R39
C12
C12
CPU/BACKPLANE
The CPU Card comes with a 220 termination resistor and 681 bias resistors already installed and enabled with jumpers across pins 1-2 and 5-6 on header JP1, as shown in Figure 12.
Factory Default
5 JP1 6
3
1
4
2
J3
C19
C23
C24
C25 U10 C27 C28 C26 J7 J6
Y1 R5 C4 C7 R2
R11
R17 C18
C11 R12
C1 C2
RT1
R4 C3 R1 R3 U3 R14 D1 D2 Y2 C8 C10 C13
R13
Figure 12. RS-485 Termination and Bias Resistors
For best performance, the bias and termination resistors in a multidrop network should only be enabled on both end nodes of the network. Disable the termination and bias resistors on any intervening Smart Star units in the network by removing both jumpers from header JP1.
TIP: Save the jumpers for possible future use by "parking" them across pins 1-3 and 4-6 of header JP1. Pins 3 and 4 are not otherwise connected to the CPU Card.
34
JP1 U6
GND
C12
J4
R20 U8 RP4 C21 U9 C17 J4 C22 C30
C35
C46
C49
C53
C15
485+
C36 C41 D3
U14
U1
U6
Y3
C31
C16 J5
C32
6
R34 C40
1
D5
JP1
J8
bias
2
R22 681 W R18 220 W R19 681 W
R33
R32
J5
R23 R26 Q1 Q3
C33
7
BT1
R42
5
6
termination bias
R41 R39
R21
Battery
485
Smart Star (SR9000)
3.2.1.3 Programming Port
The CPU Card has a 10-pin programming header labeled J2. The programming port uses the Rabbit 2000's Serial Port A for communication. Dynamic C uses the programming port to download and debug programs. The programming port is also used for the following operations. * Cold-boot the Rabbit 2000 on the RabbitCore module after a reset. * Remotely download and debug a program over an Ethernet connection using the RabbitLink EG2110. * Fast copy designated portions of flash memory from one Rabbit-based board (the master) to another (the slave) using the Rabbit Cloning Board.
Alternate Uses of the Serial Programming Port
All three clocked Serial Port A signals are available as * a synchronous serial port * an asynchronous serial port, with the clock line usable as a general CMOS input The serial programming port may also be used as a serial port via the DIAG connector on the serial programming cable. In addition to Serial Port A, the Rabbit 2000 startup-mode (SMODE0, SMODE1), status, and reset pins are available on the serial programming port. The two startup mode pins determine what happens after a reset--the Rabbit 2000 is either cold-booted or the program begins executing at address 0x0000. The status pin is used by Dynamic C to determine whether a Rabbit microprocessor is present. The status output has three different programmable functions: 1. It can be driven low on the first op code fetch cycle. 2. It can be driven low during an interrupt acknowledge cycle. 3. It can also serve as a general-purpose CMOS output. The /RESET_IN pin is an external input that is used to reset the Rabbit 2000 and the onboard peripheral circuits on the Smart Star. The serial programming port can be used to force a hard reset on the Smart Star by asserting the /RESET_IN signal. Refer to the Rabbit 2000 Microprocessor User's Manual for more information.
User's Manual
35
CPU/BACKPLANE
CPU/BACKPLANE
3.2.1.4 Ethernet Port (SR9150 only)
Figure 13 shows the pinout for the Ethernet port (J2 on the CPU Card). Note that there are two standards for numbering the pins on this connector--the convention used here, and numbering in reverse to that shown. Regardless of the numbering convention followed, the pin positions relative to the spring tab position (located at the bottom of the RJ-45 jack in Figure 13) are always absolute, and the RJ-45 connector will work properly with offthe-shelf Ethernet cables.
ETHERNET
1 8
1. 2. 3. 6.
E_Tx+ E_Tx E_Rx+ E_Rx
RJ-45 Plug
RJ-45 Jack
Figure 13. RJ-45 Ethernet Port Pinout
RJ-45 pinouts are sometimes numbered opposite to the way shown in Figure 13. Two LEDs are placed behind the RJ-45 Ethernet jack, one to indicate an Ethernet link (LNK) and one to indicate Ethernet activity (ACT). Only the CPU LEDs are functional at this time since the RCM LEDs were added for future enhancements to the CPU Card. The transformer/connector assembly ground is connected to the CPU Card digital ground via a 0 resistor "jumper," R43, as shown in Figure 14.
RJ-45 Ethernet Plug
R43
Board Ground Chassis Ground
Figure 14. Isolation Resistor R43
The factory default is for the 0 resistor "jumper" at R43 to be installed. In high-noise environments, remove R43 and ground the transformer/connector assembly directly through the chassis ground. This will be especially helpful to minimize ESD and/or EMI problems.
36
Smart Star (SR9000)
3.3 Programming Cable
The programming cable is used to connect the programming port of the Smart Star CPU Card to a PC serial COM port. The programming cable converts the RS-232 voltage levels used by the PC serial port to the TTL voltage levels used by the Rabbit 2000. When the PROG connector on the programming cable is connected to the CPU Card's programming header, programs can be downloaded and debugged over the serial interface. The DIAG connector of the programming cable may be used on the CPU Card's programming header with the Smart Star operating in the Run Mode. This allows the programming port to be used as a regular serial port. 3.3.1 Changing Between Program Mode and Run Mode The Smart Star is automatically in Program Mode when the PROG connector on the programming cable is attached to the CPU Card, and is automatically in Run Mode when no programming cable is attached. When the Rabbit 2000 is reset, the operating mode is determined by the status of the SMODE pins. When the programming cable's PROG connector is attached, the SMODE pins are pulled high, placing the Rabbit 2000 in the Program Mode. When the programming cable's PROG connector is not attached, the SMODE pins are pulled low, causing the Rabbit 2000 to operate in the Run Mode.
Program Mode
DIAG
Run Mode
Diagnostic connector
Red shrink wrap
Colored side towards pin 1
PROG
To PC COM port
Programming connector Pin 1
J3 C19 C23
C24
U6
C26 J7
Y1 R5 C4 C7 R2
R11
R17 C18
J4
R20 C17
J4
C35
C46
C49 R5 C4 C7 C53 C1 C2 U14 R2
C11 R12
U8 RP4
C1 C2
C15
U1
C21 U9 Y3
C31
C36
C41 D3
J8
RT1
R4 C3 R1 R3 U3
C16 J5
C32
J5
R23 R26 Q1 Q3
D5
RT1
R4 C3 R1 R3 U3
C33
D1
D2 Y2
C13
R42 D1
R13
C10
R21 BT1
Y2
Battery
RESET Smart Star when changing mode: Cycle power off/on after removing or attaching programming cable.
Figure 15. Smart Star Program Mode and Run Mode Set-Up
A program "runs" in either mode, but can only be downloaded and debugged when the Smart Star is in the Program Mode. Refer to the Rabbit 2000 Microprocessor User's Manual for more information on the programming port and the programming cable.
User's Manual 37
GND
J6
Y1
R17 C18
R11
C11 R12
D2
R13
C10
JP1
C25 U10 C27 C28
J3
C19
C23
C24
C25 U10 C27 C28 C26 J7 J6
U6
J4
R20 C17
J4
C35
C46
C49
U8 RP4 C15
C53
U14
U1
C21 U9 Y3
C31
C36
C41 D3
J8
C16 J5
C32
J5
R23 R26 Q1 Q3
D5
C33
C13
R42
R21 BT1
Battery
CPU/BACKPLANE
JP1
GND
R14 C12 C8
C22
C22
C30 R33 R32 R34 C40 R41 R39
C30 R33 R32 R34 C40 R41 R39
R14
C12
C8
CPU/BACKPLANE
3.3.2 Memory
3.3.2.1 SRAM
The Smart Star CPU Cards are designed to accept 128K or 512K of static RAM packaged in an SOIC case. Standard CPU Cards come with 128K of SRAM.
3.3.2.2 Flash EPROM
The Smart Star CPU Card are also designed to accept 128K to a total of 512K of flash memory packaged in a TSOP case. The CPU cards come with two 256K flash memory chips.
NOTE: Rabbit recommends that any customer applications should not be constrained by the sector size of the flash memory since it may be necessary to change the sector size in the future.
A Flash Memory Bank Select jumper configuration option based on 0 surface-mounted resistors exists at header JP5 on the CPU Card. This option, used in conjunction with some configuration macros, allows Dynamic C to compile two different co-resident programs for the upper and lower halves of the 256K flash in such a way that both programs start at logical address 0000. This is useful for applications that require a resident download manager and a separate downloaded program. See Technical Note 218, Implementing a Serial Download Manager for a 256K Flash, for details.
38
Smart Star (SR9000)
3.3.3 Other Connectors The connectors labeled J4 and J5 in Figure 16 are reserved for future use and should not be used in customer applications at this time.
J3
C19
C23
C24
C25 U10 C27 C28 C26 J7 J6
U6
Y1 R5 C4 C7 R2
R11
R17 C18
J4
R20 C17 J4 C22 U8 RP4 C30
C35
C46
C49
C11 R12
C53
C1 C2
C15 U14 R33
U1
C21 U9 Y3
C31
C36
C41 D3
J8
RT1
R4 C3 R1 R3 U3 R14 D1 D2 Y2 C8 C10 C13
C16 J5
C32
J5
R23 R26 Q1 Q3
D5 C40
C33
R42
R13
R21 BT1
Battery
Figure 16. CPU Card Connectors J4 and J5
User's Manual
39
CPU/BACKPLANE
JP1
GND
C12
R32
R34 R41 R39
CPU/BACKPLANE
Jumpers across pins 9-10 and 13-14 on header JP1 on the backplane are used to bring out the ACT and LNK LED signals to header J6, which is used to connect the optional LCD/keypad module. Remove these jumpers (you may park them across pins 7-8 and 11-12 on header JP1) if you do not wish to use the ACT and LNK signals on the LCD/keypad module.
C5 +
C6
D3
R4
C36 C37
1
2
+
DS1
R1
USER +RAW GND
L3 R3 C4
L2 TVS1 U2 D4
PROCESSOR SLOT
SLOT 0
SLOT 1
SLOT 2
SLOT 5
SLOT 3
SLOT 4
RN1
C14
J10
1 2
JP1
LINK ACT LNK ACT RCM CPU
Factory Default
2 4 6
JP1 8 10 12 14
1
RCM
3
5
7
9
CPU
11 13
Figure 17. Header JP1 Configurations for ACT and LNK Signals
NOTE: The RCM positions for pins 1-2 and 5-6 on header JP1 are reserved for future use and should not be used in customer applications at this time.
40
Smart Star (SR9000)
SLOT 6
PWR
J1
3
POWER IN
C9 C10 U5 R9 U6
51
J2
52
SR9010
J6
C22 C23
J3
U4 C8
C16 C17
J4
C19 C20
J5
R2
C25 C26
J7
C28 C29
J8
C31 C32
R5
J9
C34 C35
25
26
C13
C7 U3
3.4 Other Hardware
3.4.1 Clock Doubler The Smart Star CPU cards take advantage of the Rabbit 2000 microprocessor's internal clock doubler. A built-in clock doubler allows half-frequency crystals to be used to reduce radiated emissions. The 22.1 MHz frequency is generated using an 11.0592 MHz crystal. The clock doubler is disabled automatically in the BIOS for crystals with a frequency above 12.9 MHz. The clock doubler may be disabled if 22.1 MHz clock speeds are not required. Disabling the Rabbit 2000 microprocessor's internal clock doubler will reduce power consumption and further reduce radiated emissions. The clock doubler is disabled with a simple configuration macro as shown below. 1. Select the "Defines" tab from the Dynamic C Options > Project Options menu. 2. Add the line CLOCK_DOUBLED=0 to always disable the clock doubler.
The clock doubler is enabled by default, and usually no entry is needed. If you need to specify that the clock doubler is always enabled, add the line CLOCK_DOUBLED=1 to always enable
the clock doubler. The clock speed will be doubled as long as the crystal frequency is less than or equal to 26.7264 MHz. 3. Click OK to save the macro. The clock doubler will now remain off whenever you are in the
project file where you defined the macro.
3.4.2 Spectrum Spreader Smart Star CPU cards that carry the CE mark have a Rabbit 2000 microprocessor that features a spectrum spreader, which helps to mitigate EMI problems. By default, the spectrum spreader is on automatically for CPU cards that carry the CE mark when used with Dynamic C 7.32 or later versions, but the spectrum spreader may also be turned off or set to a stronger setting. The means for doing so is through a simple configuration macro as shown below.
.
1. Select the "Defines" tab from the Dynamic C Options > Project Options menu. 2. Normal spreading is the default, and usually no entry is needed. If you need to specify normal spreading, add the line
ENABLE_SPREADER=1
For strong spreading, add the line
ENABLE_SPREADER=2
To disable the spectrum spreader, add the line
ENABLE_SPREADER=0
NOTE: The strong spectrum-spreading setting is unnecessary for the Smart Star. 3. Click OK to save the macro. The spectrum spreader will now remain off whenever you are in the project file where you defined the macro.
There is no spectrum spreader functionality for Smart Star CPU cards that do not carry the CE mark or when using any CPU card with a version of Dynamic C prior to 7.30.
User's Manual 41
CPU/BACKPLANE
CPU/BACKPLANE
42
Smart Star (SR9000)
4. SOFTWARE
Dynamic C is an integrated development system for writing embedded software. It runs on an IBM-compatible PC and is designed for use with Rabbit controllers and other controllers based on the Rabbit microprocessor. Chapter 4 provides the libraries, function calls, and sample programs related to the Smart Star backplane and CPU cards. 4.1 Running Dynamic C
You have a choice of doing your software development in the flash memory or in the static RAM included on the Smart Star CPU cards. The flash memory and SRAM options are selected with the Options > Program Options > Compiler menu. The advantage of working in RAM is to save wear on the flash memory, which is limited to about 100,000 write cycles. The disadvantage is that the code and data might not both fit in RAM.
NOTE: An application can be developed in RAM, but cannot run standalone from RAM after the programming cable is disconnected. Standalone applications can only run from flash memory. NOTE: Do not depend on the flash memory sector size or type. Due to the volatility of the flash memory market, the Smart Star and Dynamic C were designed to accommodate flash devices with various sector sizes.
Developing software with Dynamic C is simple. Users can write, compile, and test C and assembly code without leaving the Dynamic C development environment. Debugging occurs while the application runs on the target. Alternatively, users can compile a program to an image file for later loading. Dynamic C runs on PCs under Windows 95 or later. Programs can be downloaded at baud rates of up to 460,800 bps after the program compiles.
User's Manual
43
CPU/BACKPLANE
CPU/BACKPLANE
Dynamic C has a number of standard features. * Full-feature source and/or assembly-level debugger, no in-circuit emulator required. * Royalty-free TCP/IP stack with source code and most common protocols. * Hundreds of functions in source-code libraries and sample programs:
Exceptionally fast support for floating-point arithmetic and transcendental functions. RS-232 and RS-485 serial communication. Analog and digital I/O drivers. I2C, SPI, GPS, encryption, file system. LCD display and keypad drivers.
* Powerful language extensions for cooperative or preemptive multitasking * Loader utility program to load binary images into Rabbit targets in the absence of Dynamic C. * Provision for customers to create their own source code libraries and augment on-line help by creating "function description" block comments using a special format for library functions. * Standard debugging features:
Breakpoints--Set breakpoints that can disable interrupts. Single-stepping--Step into or over functions at a source or machine code level, C/OS-II aware. Code disassembly--The disassembly window displays addresses, opcodes, mnemonics, and machine cycle times. Switch between debugging at machine-code level and source-code level by simply opening or closing the disassembly window. Watch expressions--Watch expressions are compiled when defined, so complex expressions including function calls may be placed into watch expressions. Watch expressions can be updated with or without stopping program execution. Register window--All processor registers and flags are displayed. The contents of general registers may be modified in the window by the user. Stack window--shows the contents of the top of the stack. Hex memory dump--displays the contents of memory at any address. STDIO window--printf outputs to this window and keyboard input on the host PC can be detected for debugging purposes. printf output may also be sent to a serial port or file.
44
Smart Star (SR9000)
4.1.1 Upgrading Dynamic C
4.1.1.1 Patches and Bug Fixes
Dynamic C patches that focus on bug fixes are available from time to time. Check the Web site www.rabbit.com/support/ for the latest patches, workarounds, and bug fixes. The default installation of a patch or bug fix is to install the file in a directory (folder) different from that of the original Dynamic C installation. Rabbit recommends using a different directory so that you can verify the operation of the patch without overwriting the existing Dynamic C installation. If you have made any changes to the BIOS or to libraries, or if you have programs in the old directory (folder), make these same changes to the BIOS or libraries in the new directory containing the patch. Do not simply copy over an entire file since you may overwrite a bug fix. Once you are sure the new patch works entirely to your satisfaction, you may retire the existing installation, but keep it available to handle legacy applications.
4.1.1.2 Upgrades
Dynamic C installations are designed for use with the board they are included with, and are included at no charge as part of our low-cost kits. Dynamic C is a complete software development system, but does not include all the Dynamic C features. Rabbit also offers add-on Dynamic C modules containing the popular C/OS-II real-time operating system, as well as PPP, Advanced Encryption Standard (AES), and other select libraries. In addition to the Web-based technical support included at no extra charge, a one-year telephonebased technical support module is also available for purchase.
User's Manual
45
CPU/BACKPLANE
CPU/BACKPLANE
4.2 Sample Programs
Sample programs are provided in the Dynamic C SAMPLES folder. The sample program PONG.C demonstrates the output to the STDIO window. The various directories in the SAMPLES folder contain specific sample programs that illustrate the use of the corresponding Dynamic C libraries. The SAMPLES\SMRTSTAR folder provides sample programs specific to the Smart Star control system. Each sample program has comments that describe the purpose and function of the program. Follow the instructions at the beginning of the sample program. To run a sample program, open it with the File menu (if it is not still open), compile it using the Compile menu, and then run it by selecting Run in the Run menu. The BL2500 must be in Program mode (see Section 3.3, "Programming Cable") and must be connected to a PC using the programming cable as described in Section 2.2, "Connect the Power Supply." More complete information on Dynamic C is provided in the Dynamic C User's Manual. Let's take a look at sample programs for the backplane and the CPU Card in the SMRTSTAR folder. The RS232 directory contains two sample programs to illustrate RS-232 serial communication. * SSTAR232.C--Demonstrates a simple RS-232 loopback using both serial ports C and D. * SSTAR5W.C--Demonstrates simple 5-wire RS-232 communication with flow control. The RS485 directory contains two sample programs to illustrate RS-485 serial communication. * MASTER.C--Demonstrates a simple RS-485 transmission of lower case letters to a slave controller. The slave will send converted upper case letters back to the master controller for display in the STDIO window. Use SLAVE.C to program the slave controller. * SLAVE.C--Demonstrates a simple RS-485 transmission of alphabetic characters to a master controller. The slave will send converted upper case letters back to the master controller for display in the STDIO window. Use MASTER.C to program the master controller.
46
Smart Star (SR9000)
4.3 Dynamic C Libraries
One library directory contains software that is unique to the Smart Star. * SMRTSTAR.LIB--This library supports all the functions needed by the Smart Star systems including Digital I/O Cards, Relay Cards, D/A Converter and A/D Converter Cards, and serial communication. Functions dealing with the backplane and the CPU Card are described in this chapter. Functions relevant to the individual I/O cards are described in the chapter specific to the I/O card. Other functions applicable to all devices based on the Rabbit 2000 microprocessor are described in the Dynamic C User's Manual.
User's Manual
47
CPU/BACKPLANE
CPU/BACKPLANE
4.4 Smart Star Backplane Function Calls
4.4.1 Board Reset
void brdResetBus();
Resets all cards on the bus.
RETURN VALUE
None.
4.4.2 Board Initialization
void brdInit();
Initializes slot addressing, disables card enable/disable line, resets card slot bus and LED latch, and turns all LEDS OFF. Call this function at the beginning of the application.
RETURN VALUE
None.
48
Smart Star (SR9000)
4.5 Serial Communication Calls
Library files included with Dynamic C provide a full range of serial communications support. The RS232.LIB library provides a set of circular-buffer-based serial functions. The PACKET.LIB library provides packet-based serial functions where packets can be delimited by the 9th bit, by transmission gaps, or with user-defined special characters. Both libraries provide blocking functions, which do not return until they are finished transmitting or receiving, and nonblocking functions, which must be called repeatedly until they are finished. For more information, see the Dynamic C Function Reference Manual and Technical Note 213, Rabbit 2000 Serial Port Software. Use the following function calls with the Smart Star.
int serMode(int mode);
User interface to set up serial communication lines for the Smart Star control system. Call this function after serXOpen().
PARAMETERS
mode is the defined serial port configuration of the CPU Card.
Serial Port Mode C (PC2 and PC3) 0 1 2 3
RETURN VALUE
Parallel Port D (PD0 and PD1)
D (PC0 and PC1) RS-485 RS-232, 3-wire
RS-232, 3-wire RS-232, 3-wire RS-232, 5-wire RS-232, 5-wire
RTS/CTS RS-485 RTS/CTS
0 if correct mode, 1 if not.
ser485Tx();
Enables RS-485 transmission (disables receive) on serial port D.
RETURN VALUE
None.
SEE ALSO
ser485Rx
User's Manual
49
CPU/BACKPLANE
CPU/BACKPLANE
ser485Rx();
Disables RS-485 transmission (enables receive) on serial port D.
RETURN VALUE
None.
SEE ALSO
ser485Tx
50
Smart Star (SR9000)
5. USING THE TCP/IP FEATURES
Chapter 5 discusses using the TCP/IP features on the CPU cards. Note that the TCP/IP feature is available only on the SR9150 CPU Card. 5.1 Ethernet Connections
Before proceeding you will need to have the following items. * If you don't have an Ethernet connection, you will need to install a 10Base-T Ethernet card (available from your favorite computer supplier) in your PC. * Two RJ-45 straight-through Ethernet cables and a hub, or an RJ-45 crossover Ethernet cable. The Ethernet cables and Ethernet hub are available from Rabbit in a TCP/IP tool kit. More information is available at www.rabbit.com. 1. Install the CPU Card on the backplane, and connect the power supply and the programming cable as shown in Chapter 2, "Getting Started." 2. Ethernet Connections * If you do not have access to an Ethernet network, use a crossover Ethernet cable to connect the installed CPU Card to a PC that at least has a 10Base-T Ethernet card. * If you have an Ethernet connection, use a straight-through Ethernet cable to establish an Ethernet connection to the installed CPU Card from an Ethernet hub. These connections are shown in Figure 18. SR9150 CPU Card SR9150 CPU Card
User's PC
Ethernet crossover cable
Ethernet cables
Hub
Direct Connection (network of 2 computers)
To additional network elements
Direct Connection Using a Hub
Figure 18. Ethernet Connections
User's Manual 51
CPU/BACKPLANE
CPU/BACKPLANE
3. Apply Power Plug in the power supply. The Smart Star is now ready to be used.
NOTE: A hardware RESET is accomplished by unplugging the power supply, then plugging it back in.
The green LNK light is on the CPU Card is on when the Smart Star is properly connected either to an Ethernet hub or to an active Ethernet card. The orange ACT light flashes each time a packet is received.
52
Smart Star (SR9000)
5.2 TCP/IP Sample Programs
We have provided a number of sample programs demonstrating various uses of TCP/IP for networking embedded systems. These programs require that you connect your PC and the Smart Star together on the same network. This network can be a local private network (preferred for initial experimentation and debugging), or a connection via the Internet. 5.2.1 How to Set IP Addresses in the Sample Programs With the introduction of Dynamic C 7.30 we have taken steps to make it easier to run many of our sample programs. You will see a TCPCONFIG macro. This macro tells Dynamic C to select your configuration from a list of default configurations. You will have three choices when you encounter a sample program with the TCPCONFIG macro. 1. You can replace the TCPCONFIG macro with individual MY_IP_ADDRESS, MY_NETMASK, MY_GATEWAY, and MY_NAMESERVER macros in each program. 2. You can leave TCPCONFIG at the usual default of 1, which will set the IP configurations to 10.10.6.100, the netmask to 255.255.255.0, and the nameserver and gateway to 10.10.6.1. If you would like to change the default values, for example, to use an IP address of 10.1.1.2 for the CPU Card, and 10.1.1.1 for your PC, you can edit the values in the section that directly follows the "General Configuration" comment in the TCP_CONFIG.LIB library. You will find this library in the LIB\TCPIP directory. 3. You can create a CUSTOM_CONFIG.LIB library and use a TCPCONFIG value greater than 100. Instructions for doing this are at the beginning of the TCP_CONFIG.LIB library in the LIB\TCPIP directory. There are some other "standard" configurations for TCPCONFIG that let you select different features such as DHCP. Their values are documented at the top of the TCP_CONFIG.LIB library in the LIB\TCPIP directory. More information is available in the Dynamic C TCP/IP User's Manual. IP Addresses Before Dynamic C 7.30 Most of the sample programs use macros to define the IP address assigned to the CPU Card and the IP address of the gateway, if there is a gateway. Instead of the TCPCONFIG macro, you will see a MY_IP_ADDRESS macro and other macros.
#define #define #define #define MY_IP_ADDRESS "10.10.6.170" MY_NETMASK "255.255.255.0" MY_GATEWAY "10.10.6.1" MY_NAMESERVER "10.10.6.1"
In order to do a direct connection, the following IP addresses can be used for the CPU Card:
#define MY_IP_ADDRESS "10.1.1.2" #define MY_NETMASK "255.255.255.0" // #define MY_GATEWAY "10.10.6.1" // #define MY_NAMESERVER "10.10.6.1"
In this case, the gateway and nameserver are not used, and are commented out. The IP address of the CPU Card is defined to be 10.1.1.2. The IP address of you PC can be defined as 10.1.1.1.
User's Manual 53
CPU/BACKPLANE
CPU/BACKPLANE
5.2.2 How to Set Up Your Computer for Direct Connect Follow these instructions to set up your PC or notebook. Check with your administrator if you are unable to change the settings as described here since you may need administrator privileges. The instructions are specifically for Windows 2000, but the interface is similar for other versions of Windows.
TIP: If you are using a PC that is already on a network, you will disconnect the PC from that network to run these sample programs. Write down the existing settings before changing them to facilitate restoring them when you are finished with the sample programs and reconnect your PC to the network.
1. Go to the control panel (Start > Settings > Control Panel), and then double-click the Network icon. 2. Select the network interface card used for the Ethernet interface you intend to use (e.g., TCP/IP Xircom Credit Card Network Adapter) and click on the "Properties" button. Depending on which version of Windows your PC is running, you may have to select the "Local Area Connection" first, and then click on the "Properties" button to bring up the Ethernet interface dialog. Then "Configure" your interface card for a "10Base-T Half-Duplex" or an "Auto-Negotiation" connection on the "Advanced" tab.
NOTE: Your network interface card will likely have a different name.
3. Now select the IP Address tab, and check Specify an IP Address, or select TCP/IP and click on "Properties" to assign an IP address to your computer (this will disable "obtain an IP address automatically"):
IP Address : 10.10.6.101 Netmask : 255.255.255.0 Default gateway : 10.10.6.1
4. Click or to exit the various dialog boxes. SR9150 CPU Card
IP 10.10.6.101 Netmask
255.255.255.0 User's PC
Ethernet crossover cable
Direct Connection PC to Smart Star CPU Card
54
Smart Star (SR9000)
5.2.3 Run the PINGME.C Demo Connect the crossover cable from your computer's Ethernet port to the CPU Card's RJ-45 Ethernet connector. Open this sample program from the SAMPLES\TCPIP\ICMP folder, compile the program, and start it running under Dynamic C. When the program starts running, the green LNK light on the CPU Card should be on to indicate that an Ethernet connection is made. (Note: If the LNK light does not light, you may not have a crossover cable, or if you are using a hub perhaps the power is off on the hub.) The next step is to ping the board from your PC. This can be done by bringing up the MSDOS window and running the ping program:
ping 10.10.6.100
or by Start > Run and typing the command
ping 10.10.6.100
Notice that the orange ACT light flashes on the CPU Card while the ping is taking place, and indicates the transfer of data. The ping routine will ping the board four times and write a summary message on the screen describing the operation. 5.2.4 Additional Demo Programs The program SMTP.C (SAMPLES\SMRTSTAR\TCPIP\) demonstrates a basic Smart Star system using the SMTP library to send an e-mail when a keypress is detected on an LCD/keypad module. In order to run this sample program, edit the IP address as for the pingme program, edit the "mail to" e-mail address, compile the program, and start it executing. An e-mail corresponding to the keypad button that was pressed is sent. The program SSI.C (SAMPLES\SMRTSTAR\TCPIP\) demonstrates how to make the Smart Star CPU Card a Web server. This program allows you to turn the LEDs on an attached LCD/keypad module on and off from a remote Web browser. In order to run these sample programs, edit the IP address as for the pingme program, compile the program, and start it executing. Then bring up your Web browser and enter the following server address: http://10.1.1.2. This should bring up the Web page served by the sample program. The program SSI2.C (SAMPLES\SMRTSTAR\TCPIP\) demonstrates the use of I/O cards via instructions sent from a Web browser. You will need an A/D Converter Card, a D/A Converter Card, or a relay card installed on the backplane in order for the Web browser to be able to initiate changes on one or more of these I/O cards. Before you run this sample program, edit the IP address as for the pingme program, compile the program, and start it executing. The analog outputs will change or the relays will open and close in response to instructions sent from the Web browser.
User's Manual
55
CPU/BACKPLANE
CPU/BACKPLANE
5.2.5 LCD/Keypad Sample Programs Showing TCP/IP Features The following sample programs, found in the TCPIP subdirectory in SAMPLES/LCD_Keypad/122x32_1x7, are demonstrate the features of the LCD/keypad module connected to the backplane. Remember to configure the IP address, netmask, and gateway as indicated in the sample programs. * MBOXDEMO.C--This program implements a web server that allows Web e-mail messages to be entered that are then shown on the LCD display. The keypad allows you to scroll within messages, flip to other e-mails, mark messages as read, and delete e-mails. When a new e-mail arrives, an LED turns on, and turns off once the message has been marked as read. A log of all e-mail actions is kept, and can be displayed in the Web browser. All current e-mails can also be read with the Web browser. When using MBOXDEMO.C, connect the Smart Star CPU Card and a PC (or other device with a Web Browser) to an Ethernet. If you connect the PC and the CPU Card directly, be sure to use a crossover Ethernet cable; straight-through Ethernet cables and a hub may be used instead. * TCP_RESPOND.C--This program and TCP_SEND.C are executed on two separate single-board computers to demonstrate how the two boards communicate with each other. Use PCSEND.EXE on the PC console side at the command prompt if you do not have a second board. PCSEND.EXE is located with source code in the SAMPLES/LCD_Keypad/Windows directory.
TCP_RESPOND.C waits for a message from another single-board computer. The message received is displayed on the LCD, and you may respond by pressing a key on the keypad. The response is then sent to the remote single-board computer.
* TCPSEND.C--This program and TCP_RESPOND.C are executed on two separate single-board computers to demonstrate how the two boards communicate with each other. Use PCRESPOND.EXE on the PC console side at the command prompt if you do not have a second board. PCRESPOND.EXE is located with source code in the SAMPLES/LCD_Keypad/Windows directory. When a key on the keypad is pressed, a message associated with that key is sent to a specified destination address and port. The destination then responds to that message. The response is displayed on the LCD. Note that only the LEFT and UP scroll keys are set up to cause a message to be sent. When using TCPSEND.C and TCP_RESPOND.C, connect the CPU Card and the other single-board computer to an Ethernet. If you connect the them directly, be sure to use a crossover Ethernet cable; straight-through Ethernet cables and a hub may be used instead.
56
Smart Star (SR9000)
5.3 Where Do I Go From Here?
NOTE: If you purchased your Smart Star through a distributor or Rabbit partner, contact the distributor or partner first for technical support.
If there are any problems at this point: * Use the Dynamic C Help menu to get further assistance with Dynamic C. * Check the Rabbit Technical Bulletin Board at www.rabbit.com/support/bb/. * Use the Technical Support e-mail form at www.rabbit.com/support/. If the sample programs ran fine, you are now ready to go on. Additional sample programs are described in the Dynamic C TCP/IP User's Manual. Refer to the Dynamic C TCP/IP User's Manual to develop your own applications. An Introduction to TCP/IP provides background information on TCP/IP, and is available on our Web site.
User's Manual
57
CPU/BACKPLANE
CPU/BACKPLANE
58
Smart Star (SR9000)
6. SMART STAR SPECIFICATIONS
This chapter provides the specifications for the Smart Star backplane and CPU Card, and describes the conformal coating.
User's Manual
59
CPU/BACKPLANE
CPU/BACKPLANE
6.1 Electrical and Mechanical Specifications
6.1.1 Smart Star Backplane Figure 19 shows the mechanical dimensions for the two Smart Star backplanes.
(36.1)
R4
1.42
(19.1)
D3
C6
0.75
(19.1)
C5 +
0.75
(19.1)
0.75
(19.1)
0.75
(19.1)
0.75
(19.1)
0.75
(14.7)
0.58
C36 C37
1
2
+
DS1
R1
USER +RAW GND
L3 R3 C4
L2 TVS1 U2 D4
PROCESSOR SLOT5
J3
U4 C8
C16 C17
J4
C19 C20
J5
C22 C23
J6
R2
C25 C26
J7
C28 C29
J8
C31 C32
R5
J9
C34 C35
25
26
C13 C14
SLOT 0
SLOT 1
SLOT 2
SLOT 5
SLOT 3
SLOT 4
RN1
J10
1 2
JP1
LINK ACT LNK ACT RCM CPU
SLOT 6
C7 U3
(76.2) (165)
3.00
0.25
(6.4)
6.50
(43.7)
U1
D1
1.72
(19.1)
TVS1 C1
0.75
(19.1)
V_USER +RAW GND
0.75
(13.5)
PWR DS1
0.53
D2 L1 C2
R3
J1
C15 C14 L2
J2
R1
C3
J3
C4 C5
J4
C6
R4
J5
C7 C10
U3
C8 C9 C12
C11
U4
C13
JP1
LINK ACT LNK ACT RCM CPU
RN1
0.21
(5.3)
3.30
(84)
3.75
(95)
Figure 19. Smart Star Backplane Dimensions
NOTE: All diagram and graphic measurements are in inches followed by millimeters enclosed in parentheses.
60 Smart Star (SR9000)
0.25
(6.4)
3.66
(112)
4.40
U2
SR9050
(93)
R6
0.25
(6.4)
(107)
3.70
4.20
(94)
PWR
J1
3
POWER IN
C9 C10 U5 R9 U6
1
J
52
SR9010
Table 5 lists the electrical, mechanical, and environmental specifications for the Smart Star backplanes.
Table 5. Smart Star Backplane Specifications
Specification Parameter SR9010 Board Size Connectors 6.50" x 4.20" x 0.75" (165 mm x 107 mm x 19 mm) SR9050 3.75" x 4.40" x 0.75" (95 mm x 112 mm x 19 mm)
one 2 x 26 (CPU card slot), 2 mm one 2 x 26 (CPU card slot), 2 mm seven 2 x 13 (I/O card slots), 2 mm three 2 x 13 (I/O card slots), 2 mm Each slot has a predefined dedicated set of addresses (see Appendix D and the software chapters in the individual I/O card manuals) -40C to +70C 5% to 95%, noncondensing 9 V to 30 V DC at 1 A typical for onboard +5 V regulated supply; provision for independent 9 V to 30 V DC (V_USER) voltage source for I/O cards--the exact voltage for the second supply depends on the requirements of the specific I/O cards used (Rabbit recommends tying V_USER to +RAW unless there is a specific need for an independent power supply) Surface-mount switching regulator sources 5 V at 1 A Buffered bidrirectional data lines (D0-D7) Buffered address lines (A0-A3) Buffered IORD, IOWR I/O cards and CPU card can be reset independently
Slot Select Temperature Humidity
External Input Voltage
Onboard Voltage Regulator Data Lines Address Lines Read/Write Control Reset
User's Manual
61
CPU/BACKPLANE
CPU/BACKPLANE
6.1.2 CPU Card Figure 20 shows the mechanical dimensions for the CPU cards.
1.38 2.43
(35.0)
(61.7)
J3
C19
C23
C24
C25 U10 C27 C28 C26 J7 J6
Y1 R5 C4 C7 R2
R11
R17 C18
C11 R12
C1 C2
(63.2)
U1
C21 U9 Y3
C31
C36
C41 D3
J8
RT1
R4 C3 R1 R3 U3 R14 D1 D2 Y2 C8 C10 C13
C16 J5
C32
J5
R23 R26 Q1 Q3
D5 C40
C33
R42
R13
R21 BT1
Battery
(89.7)
3.53
(102)
4.00
Figure 20. CPU Card Dimensions
62
0.15
Smart Star (SR9000)
(3.8)
(79.2)
2.49
3.12
JP1 U6
GND
C12
J4
R20 U8 RP4 C17 J4 C22 C30
C35
C46
C49
C53
C15 U14 R33
R32
R34 R41 R39
Table 6 lists the electrical, mechanical, and environmental specifications for the CPU Card.
Table 6. CPU Card Specifications
Parameter Board Size (with optional backup battery board) Specification 4.00" x 3.12" x 1.00" (102 mm x 79.2 mm x 25.4 mm) one RJ-45 (Ethernet) (SR9150 only) one 2 x 5, 2 mm pitch (serial programming port) one 0.9 mm x 0.5 screw-terminal connector strips (accept 14- 30 AWG or 0.05-1.5 mm wire) Direct connection to 10/100-compatible Ethernet networks with 10Base-T interface via RJ-45 connection -40C to +70C 5% to 95%, noncondensing 5 V DC at 190 mA typical Rabbit 2000(R) 22.1 MHz 128K, surface mounted, 512K option 2 x 256K, surface mounted Five 8-bit timers cascadable in pairs, one 10-bit timer with 2 match registers that each have an interrupt Three serial ports: * one CMOS-compatible programming port * remaining ports software-configurable as two 3-wire RS232, one 5-wire RS-232, or one 3-wire RS-232/ one RS-485 Selected baud rates up to 115, 200 bps CMOS-compatible port supports up to 6.45 Mbps (synchronous) Yes Yes Supports up to 7 I/O cards Yes: Panasonic CR2330 or equivalent 3 V lithium coin type, 265 mA*h standard using onboard battery holder; provision for external battery
Connectors
Ethernet Interface (SR9150 only) Temperature Humidity Input Voltage Microprocessor Clock SRAM Flash EPROM Timers
Serial Ports
Serial Rate Watchdog/Supervisor Time/Date Clock Expansion Port Backup Battery
User's Manual
63
CPU/BACKPLANE
CPU/BACKPLANE
6.2 Jumper Configurations
Figure 21 shows the header locations used to configure the various CPU Card options via jumpers.
JP1
Figure 21. Location of Smart Star CPU Card Configurable Positions
64
GND
C40 R41 R39 R42
Battery
RCM SERIAL JACK
TxC
RxC
TxD
RxD
GND
+ RS-485
JP5
JP3 JP2
JP4
Smart Star (SR9000)
Table 7 lists the configuration options.
Table 7. Smart Star CPU Card Jumper Configurations
Header Description 1-2 5-6 1-3 4-6 1-2 JP2 U5 Flash Memory Size 2-3 1-2 JP3 SRAM Size 2-3 1-2 JP4 U11 Flash Memory Size 2-3 1-2 JP5 Flash Memory Bank Select 2-3 Bank Mode 512K Normal Mode 512K 128K/256K 512K 128K Pins Connected Bias and termination resistors connected Bias and termination resistors not connected* 128K/256K Factory Default
JP1
RS-485 Bias and Termination Resistors
x
x x x x
* Although pins 1-3 and 4-6 of header JP1 are shown "jumpered" for the termination and bias resistors not connected, pins 3 and 4 are not actually connected to anything, and this configuration is a "parking" configuration for the jumpers so that they will be readily available should you need to enable the termination and bias resistors in the future.
User's Manual
65
CPU/BACKPLANE
CPU/BACKPLANE
6.3 Conformal Coating
The areas around the crystal oscillator and the battery backup circuit on the CPU Card have had the Dow Corning silicone-based 1-2620 conformal coating applied. The conformally coated areas are shown in Figure 22. The conformal coating protects these highimpedance circuits from the effects of moisture and contaminants over time.
J3
C19
C23
C24
C25 U10 C27 C28 C26 J7 J6
Conformally coated area
R2 C1 C2
Y1 R5 C4 C7
R11
R17 C18
C11 R12
RT1
R4 C3 R1 R3 U3 R14 D1 D2 Y2 C8 C10 C13
R13
Figure 22. CPU Card Areas Receiving Conformal Coating
Any components in the conformally coated area may be replaced using standard soldering procedures for surface-mounted components. A new conformal coating should then be applied to offer continuing protection against the effects of moisture and contaminants.
NOTE: For more information on conformal coatings, refer to Rabbit Technical Note TN303, Conformal Coatings.
66
JP1 U6
GND
C12
J4
R20 U8 RP4 C21 U9 Y3 C17 J4 C22 C30
C35
C46
C49
C53
C15 U14 R33
R32
U1
C31
C36
C41 D3
J8
C16 J5
C32
R34
J5
R23 R26 Q1 Q3
D5 C40
C33
R41 R39
R42
R21 BT1
Battery
Smart Star (SR9000)
6.4 Use of Rabbit 2000 Parallel Ports
Figure 23 shows the Rabbit 2000 parallel ports.
PB2 PB5 PB6 PB7 PE0 PE1 PE3 PE7
Port B
Port E
PC0, PC2, PC4 PC1, PC3, PC5 PC6PC7 DA0DA7
Serial Ports (Port C)
Programming Port
CPU (RABBIT 2000)
Real-Time Clock Watchdog 6 Timers Clock Doubler
Serial Port Control (Port D) Z-Bus Reset Address Lines
I/O Control
PD0PD4 PD7 A0A3 IORD IOWR RESET
Data Lines RAM
Misc. Input Flash
Backup Battery Support
Figure 23. Smart Star CPU Card Rabbit 2000 Systems
User's Manual
67
CPU/BACKPLANE
CPU/BACKPLANE
6.5 Exclusion Zone
It is recommended that you allow for an "exclusion zone" of 3" (80 mm) around the Smart Star in all directions when the Smart Star is incorporated into an assembly that includes other components. This "exclusion zone" that you keep free of other components and boards will allow for sufficient air flow, and will help to minimize any electrical or EMI interference between adjacent boards.
68
Smart Star (SR9000)
User's Manual
69
DIGITAL I/O
PART II. DIGITAL I/O CARDS
DIGITAL I/O
Smart Star Digital I/O Cards (SR9200)
Chapter 7 describes the features of the Digital I/O Card, one of the I/O cards designed for the Smart Star embedded control system.The Smart Star is a modular and expandable embedded control system whose configuration of I/O, A/D Converter, D/A Converter, and Relay Cards can be tailored to a large variety of demanding real-time control and data acquisition applications.
The typical Smart Star system consists of a rugged backplane with a power supply, a CPU card, and one or more I/O cards. The CPU Card plugs into a designated slot on the backplane chassis, which has seven additional slots available for I/O cards to be used in any combination. A high-performance Rabbit 2000 microprocessor on the CPU Card provides fast data processing.
7.1 Features
The SR9200 Digital I/O Cards offer protected digital inputs and high-current driver outputs in three banks, each containing 8 I/O points. One bank's configuration is fixed as protected digital inputs, one bank's configuration is fixed as high-current driver outputs, and one bank may be configured either as protected digital inputs or as high-current driver outputs, depending on the model of Digital I/O Card selected. The high-current driver outputs are either all sinking or all sourcing, depending on the model of Digital I/O Card selected. Table 8 lists the Digital I/O Cards that are available for the Smart Star control system.
Table 8. Smart Star Digital I/O Cards
I/O Card Model SR9200 SR9210 SR9220 Digital I/O SR9205 SR9215 SR9225 16 digital inputs, 8 digital sourcing outputs 8 digital inputs, 16 digital sourcing outputs 8 digital inputs, 8 digital sourcing outputs Features 16 digital inputs, 8 digital sinking outputs 8 digital inputs, 16 digital sinking outputs 8 digital inputs, 8 digital sinking outputs
User's Manual
71
DIGITAL I/O
7. DIGITAL I/O CARDS
7.2 User Interface
Figure 24 shows the complete pinout for the user interface on header J2. Note that pin 1 is indicated by a small arrow on the ribbon cable connector. DIGITAL I/O
J2
GND DIGIN1 DIGIN3 K DIGIN5 DIGIN7 I/O8 I/O10 GND I/O13 I/O15 HVOUT1 GND HVOUT4 HVOUT5 HVOU7 GND DIGIN0 DIGIN2 GND DIGIN4 DIGIN6 GND I/O9 I/O11 I/O12 I/O14 HVOUT0 HVOUT2 HVOUT3 K HVOUT6
Figure 24. Digital I/O Card User Interface Pinout
72
Smart Star Digital I/O Cards (SR9200)
7.3 User FWT Connections
Connections to the Digital I/O Cards are made via a ribbon cable connector or optional field wiring terminals that are either pluggable or have screw terminals. Table 9 lists the Rabbit part numbers for the FWTs.
Table 9. Guide to FWT Selection
Rabbit Part Number Pluggable Terminals Screw Terminals
FWT Description
I/O Cards
FWT27
Digital I/O
101-0420
101-0514
7.3.1 Pinouts Figure 25 shows the pinout for FWT27s used on Digital I/O Cards. Note that only 23 of the I/O points are available on the FWT27--the HVOUT7 digital output is not available on the FWT27.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 GND DIGIN0 DIGIN1 DIGIN2 DIGIN3 K DIGIN4 DIGIN5 DIGIN6 DIGIN7 I/O8 I/O9 I/O10 I/O11 I/O12 I/O13 I/O14 I/O15 HVOUT0 HVOUT1 HVOUT2 HVOUT3 HVOUT4 K HVOUT5 HVOUT6 GND
Figure 25. FWT Pinout for Digital I/O Cards
User's Manual
73
DIGITAL I/O
7.4 Digital Inputs and Outputs
The Digital I/O Card has 24 I/O points that are factory configured as either inputs or outputs in banks of eight, depending on the model. DIGITAL I/O Figure 26 shows the locations of the I/O banks.
SINKING OUTPUTS
R20
C20
R28
D34 D33 D32 D31 D30 D29 D28 JP2 JP3 R60 C44 C36 R52
R51
Q20 C
Q21
D20 R36
Q28 C
R49 R50
R44
D27 D26 D25 D24 D23 D22 D21 R40 R39 R38 R37 R43 R42 R41
JP1 R21
R59
Q29
C28
Bank 0
(inputs)
Q22
Q23
Q31
C51
C43
Q30
R67
Bank 2
(inputs)
Q25
Q24
Q26
Q34
Q33
Q32
C BE R27Q27 C27 R35
C BE Q35 C35
(outputs)
Bank 1
Bank 2
(outputs)
SOURCING OUTPUTS
2 1
R8 R7 R6 R5 R4 R3 R2 R1
34 33 U1
C17
Bank 0
(inputs)
U2
C18
J2
R40
D35
R68 R69 R70 R71 R72 R73 R74 R75
Q2
JP1
Q1
D1
Q13 R64
Q14
D7 Q23 Q24 R65 R81
D12
R41
Bank 2
(inputs)
U3
C19 C20
R9 C1 C9 R17
R42 Q3 R44
R43 Q4 D2
C40 R45
R66 Q15 R68
R67 Q16 D8
C46 R69
R82 Q25 R84
R83 Q26
R16 C8 C16 C7C15 C6C14 C5C13 C4C12 C3C11 C2C10 R24
C51 D13
U4
JP3
R46 Q5 R48
R47 Q6 D3
C41 R49
R70 Q17 R72
R71 Q18
C47 R87 D9
R85 Q27
R86 Q28
C52 D14
(outputs)
Bank 1
R50 Q7 R52
R51 Q8 D4
C42 R53
R73 Q19 R75
R74 Q20
C48 D10 R90
R88 Q29
R89 Q30
C53 D15
C21
R54 R56 Q9
R55 Q10 D5
C43 R57
R76 Q21 R78
R77 Q22
C49 D11 R93
R91 Q31
R92 Q32
Bank 2
JP2
C54 D16
(outputs)
R32 R31 R30 R29 R28 R27 R26 R25
U5
U6
C22
J1
R58 Q11 R60
R59 Q12 D6
C44 R79 R80 C50 R61 C45
R94
R95
C55
R62
R63
Figure 26. Locations of Banks
74
Smart Star Digital I/O Cards (SR9200)
The I/O points on Bank 0 are always inputs, and the I/O points on Bank 1 are always outputs. The I/O points on Bank 2 were configured at the factory as either inputs or outputs, depending on the model of the Digital I/O Card. Table 10 lists the factory configurations. DIGITAL I/O
Bank 2 IN8 IN9 IN10 IN11 IN12 IN13 IN14 IN15
75
Table 10. Digital I/O Card Bank 2 Factory Configurations
Model SR9200 SR9210 SR9220 SR9205 SR9215 SR9225 Bank 2 Configured As Inputs Sinking outputs -- Inputs Sourcing outputs --
The operation of Bank 2 is determined by the components on the Digital I/O Card. There is no jumper setting to select between inputs and outputs for Bank 2. 7.4.1 Digital Inputs Table 11 provides the pinout configuration for the input points.
Table 11. Digital Inputs Pinout
Pin 2 3 4 5 8 9 10 11 DIGIN0 DIGIN1 DIGIN2 DIGIN3 DIGIN4 DIGIN5 DIGIN6 DIGIN7 Bank 0 IN0 IN1 IN2 IN3 IN4 IN5 IN6 IN7 13 14 15 16 18 19 20 21 Pin I/O8 I/O9 I/O10 I/O11 I/O12 I/O13 I/O14 I/O15
User's Manual
The protected digital inputs, shown in Figure 27, are factory configured with 10 k pullup resistors. Digital I/O cards are also available in quantity with the protected digital inputs pulled down as shown in Figure 27.
INPUT PULLED UP
Vcc 10 kW
FD Factory Default
DIGITAL I/O
DIGIN
22 kW
MULTIPLEXER
74HC257
CPU card
10 nF
INPUT PULLED DOWN
22 kW
DIGIN
10 kW
MULTIPLEXER
74HC257
CPU card
10 nF
Figure 27. Protected Digital Inputs
A 0 surface-mount resistor is used as a jumper to select whether the inputs are pulled up or down, as shown in Figure 28.
SINKING OUTPUTS
1 2 3 1 2 3
SOURCING OUTPUTS
1 2 3 1 2 3
INPUTS PULLED UP
FD
Factory Default
1 2 3 1 2 3
Bank 2
Bank 2
Bank 2
Factory Default
2
D34 D33 D32 D31 D30 D29 D28 JP2 JP3 R60 C44 C36 R52 R44 R68 R69 R70 R71 R72 R73 R49 R50 R74 R75 R67 C51 C43 R59 R51 R20 C20 R28
Bank 2
JP3
JP3
JP2
JP2
INPUTS PULLED DOWN
INPUTS PULLED UP
FD
1 2 3 1 2 3
Bank 0
Bank 0
Bank 0
Bank 0
JP2
JP2
JP1
JP1
INPUTS PULLED DOWN
1
34 33 U1
C17
C28
R8 R7 R6 R5 R4 R3 R2
Q20 C
Q21
D20 R36
Q28 C
U2
C18
J2
JP1
R1 R9
D27 D26 D25 D24 D23 D22 D21 R40 R39 R38 R37 R43 R42 R41
R16 C8
JP1 R21
Q29
C1
Q22
Q30
C16 C7C15 C6C14 C5C13 C4C12 C3C11 C2C10
Q23
Q31
U3
R24
C19
C20
U4
C9 R17
Q24
Q32
JP2
Q25
Q33
C21
R32 R31 R30 R29 R28 R27 R26 R25
Q26
Q34
U5
U6
C22
C BE R27Q27 C27 R35
C BE Q35 C35
Figure 28. Selecting Pulled Up or Pulled Down Digital Inputs
The digital inputs are able to operate continuously from -30 V to +30 V, and have a logic threshold of 2.5 V. They are protected against spikes up to 48 V.
76
D35
J1
Smart Star Digital I/O Cards (SR9200)
7.4.2 Digital Outputs The high-current digital outputs are either sinking or sourcing, depending on the model of the Digital I/O Card. Table 12 provides the pinout configuration for the output points. DIGITAL I/O
77
Table 12. Digital Outputs Pinout
Pin 13 14 15 16 18 19 20 21 I/O8 I/O9 I/O10 I/O11 I/O12 I/O13 I/O14 I/O15 Bank 2 OUT8 OUT9 OUT10 OUT11 OUT12 OUT13 OUT14 OUT15 22 23 24 26 27 29 30 31 Pin HVOUT0 HVOUT1 HVOUT2 HVOUT3 HVOUT4 HVOUT5 HVOUT6 HVOUT7 Bank 1 OUT0 OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7
Figure 29 shows the power distribution on the Digital I/O Card.
BACKPLANE SLOT 06
20
USER INTERFACE (J2)
+5 V
Multiplexer/ Latch JP1 or JP3
K FPWR
7, 28
22
+V_USER +RAW
1, 6, 12, 17, 25, 33
51 1, 25
Figure 29. Digital I/O Card Power Distribution
When designing your interface with the Smart Star system, you need to establish whether you will use the +V_USER/+RAW supply on the backplane or your own independent K supply to drive the high-current outputs. The selection of this FPWR power supply is implemented via a 0 surface-mount resistor on header JP1 (sinking outputs) or header JP3 (sourcing outputs) as shown in Figure 30. The factory default is to use +V_USER/+RAW, but Digital I/O Cards are available in quantity with the FPWR power supply jumpered to your own independent K supply.
User's Manual
FPWR
1K 2 3 JP1 1 +V_USER 2 FD 3 Factory Default JP1
FPWR
SINKING OUTPUTS
DIGITAL I/O
1K 2 3 JP3
1 +V_USER 2 FD 3 Factory Default JP3
SOURCING OUTPUTS
R20
C20
R28
R51
D34 D33 D32 D31 D30 D29 D28 JP2 JP3 R60 C44 C36 R52
Q20 C
Q21
D20 R36
Q28 C
R49 R50
R44
D27 D26 D25 D24 D23 D22 D21 R40 R39 R38 R37 R43 R42 R41
R59
JP1 R21
Q29
C28
Q1 R40 R42 Q3 R44
Q2
D1
Q13 R64
Q14
D7 Q23 Q24 R65 R81
D12
R41
R43 Q4 D2
C40 R45
R66 Q15 R68
R67 Q16 D8
C46 R69
R82 Q25 R84
R83 Q26
C51 D13
Q22
C43
Q30
R46 Q5 R48
R47 Q6 D3
C41 R49
R70 Q17 R72
R71 Q18
C47 R87 D9
R85 Q27
R86 Q28
C52 D14
Q23
Q31
C51
Q24
Q32
R50 Q7 R52
R51 Q8 D4
C42 R53
R73 Q19 R75
R74 Q20
C48 D10 R90
R88 Q29
R89 Q30
C53 D15
R67
JP3
Q25
Q33
R54 R56 Q9
R55 Q10 D5
C43 R57
R76 Q21 R78
R77 Q22
C49 D11 R93
R91 Q31
R92 Q32
C54 D16
Q26
Q34
R68 R69 R70 R71 R72 R73 R74 R75
R58 Q11 R60
R59 Q12 D6
C44 R79 R80 C50 R61
C BE R27Q27 C27 R35
C BE Q35 C35
D35
R94
R95
C55
C45 R62 R63
Figure 30. Selecting Power Supply for High-Current Sinking or Sourcing Outputs
Figure 31 shows how to connect a load to the high-current outputs based on whether your Digital I/O Card model has sinking or sourcing outputs.
SINKING OUTPUT
FPWR
SOURCING OUTPUT
FPWR
Load
HVOUT
100 kW
HVOUT
CPU card
536 W
100 nF
CPU card
1 kW
100 nF
Load
Figure 31. Connecting a Load to the High-Current Outputs
Each high-current output is able to sink or source up to 200 mA continuously, with a load limit of 40 V. Each high-current output may be switched independently, or a whole bank may be switched at once. The total current draw should be kept below 2.0 A when all high-current outputs on one Digital I/O Card are operating simultaneously, and the total current draw from your +V_USER/+RAW supply for all the I/O cards should be kept below 7.0 A.
NOTE: Note that the power supply provided in the Smart Star Tool Kit has a maximum output of 1.1 A.
78
Smart Star Digital I/O Cards (SR9200)
7.5 Software
7.5.1 Sample Programs * SSTARIO.C--Demonstrates digital I/O using individual channels and whole banks. The sample program is set up for 8 inputs and 16 outputs. If necessary, you may change the macros in the sample program to match your Digital I/O Card.
7.5.1.1 Running Sample Programs
To run a sample program, open it with the File menu (if it is not still open), compile it using the Compile menu, and then run it by selecting Run in the Run menu. The CPU Card must be connected to a PC using the programming cable as described in Section 2.3, "Programming Cable Connections." More complete information on Dynamic C is provided in the Dynamic C User's Manual. 7.5.2 Dynamic C Libraries The SMRTSTAR directory contains libraries required to operate the Smart Star control system. * SMRTSTAR.LIB--This library supports all the functions needed by the Smart Star systems including Digital I/O Cards, Relay Cards, D/A Converter and A/D Converter Cards, and serial communication. Other functions applicable to all devices based on the Rabbit 2000 microprocessor are described in the Dynamic C Function Reference Manual.
User's Manual
79
DIGITAL I/O
7.5.3 Smart Star Digital I/O Card Function Calls
int digIn(int channel);
DIGITAL I/O
Reads the state of a digital input channel (IN0-IN15, IN8-IN15 is not available on all versions of the Digital I/O Card).
PARAMETER
channel is the digital input channel to read. channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
or
channel = ChanAddr(slotnumber, channelnumber)
where slotnumber is 0-6, and channelnumber is 0-15.
RETURN VALUE
The state of the digital input channel, 0 or 1.
SEE ALSO
digBankIn, digOut, digBankOut
int digBankIn(int bank);
Reads the state of Bank 0 or Bank 2 (if installed) digital input channels--Bank 0 consists of IN0-IN7 and Bank 2 consists of IN8-IN15.
PARAMETER
bank is the bank of digital input channels to read. bank should be passed as
bank = (slotnumber * 16) + (banknumber)
or
bank = BankAddr(slotnumber, banknumber)
where slotnumber is 0-6, and banknumber is 0 or 2.
RETURN VALUE
An input value in the lower byte, where each bit corresponds to one channel.
SEE ALSO
digIn, digOut, digBankOut
80
Smart Star Digital I/O Cards (SR9200)
void digOut(int channel, int value);
Writes a value to an output channel (OUT0-OUT15, OUT8-IN15 not available on all versions of the Digital I/O Card).
PARAMETERS
channel is the digital output channel to write. channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
or
channel = ChanAddr(slotnumber, channelnumber)
where slotnumber is 0-6, and channelnumber is 0-15.
value is the output value, 0 or 1.
RETURN VALUE
None.
SEE ALSO
digBankOut, digIn,
digBankIn
int digBankOut(int bank, int value);
Writes a byte value to Bank 1 or Bank 2 (if installed) digital output channels--Bank 1 consists of OUT0- OUT7 and Bank 2 consists of OUT8-OUT15.
PARAMETER
bank is the bank of digital output channels to write. bank should be passed as
bank = (slotnumber * 16) + (banknumber)
or
bank = BankAddr(slotnumber, banknumber)
where slotnumber is 0-6, and banknumber is 1 or 2.
value is the output value, where each bit corresponds to one channel.
RETURN VALUE
An input value in the lower byte, where each bit corresponds to one channel.
SEE ALSO digOut, digIn, digBankIn
User's Manual
81
DIGITAL I/O
7.6 Electrical and Mechanical Specifications
Figure 32 shows the mechanical dimensions for the Digital I/O Card.
3.00
(76)
DIGITAL I/O
1.88
(48)
2 J2 C1 U1 1 U2
C2
34 33 U5
C5
U6
C6
2.49
(63)
U3
C3
U4
C4
2
J1
26
Figure 32. Digital I/O Card Dimensions
NOTE: All diagram and graphic measurements are in inches followed by millimeters enclosed in parentheses.
82
Smart Star Digital I/O Cards (SR9200)
2.73
(70)
Table 13 lists the electrical, mechanical, and environmental specifications for the Digital I/O Card.
Table 13. Digital I/O Card Specifications
Board Size Connectors Operating Temperature Humidity
2.73" x 3.00" x 0.44" (70 mm x 76 mm x 11 mm) one 2 x 17 latch/eject ribbon connector, 0.1 inch pitch -40C to +70C 5% to 95%, noncondensing 5 V DC at 65 mA from backplane (+5 V supply) 9 V to 30 V DC for +RAW/+V_USER from backplane or 9 V to 30 V DC for K on user interface header J2 Maximum draw 2.0 A from +RAW/+V_USER on backplane Continuous operation from -30 V to +30 V, logic threshold at 2.5 V, protected against spikes 48 V, 10 k pull-up/pull-down resistors Each output can sink (source) up to 200 mA continuously with load limit of 40 V, each output may be switched independently or bank of eight may be switched all at once, load current supplied from +RAW/+V_USER on backplane or usersupplied K on user interface header J2
Power Requirements
Digital Inputs
Digital Outputs
User's Manual
83
DIGITAL I/O
Parameter
Specification
DIGITAL I/O
84
Smart Star Digital I/O Cards (SR9200)
PART III. A/D CONVERTER CARDS
User's Manual
85
A/D CONVERTER
A/D CONVERTER
Smart Star A/D Converter Cards (SR9300)
8. A/D CONVERTER CARDS
Chapter 8 describes the features of the A/D Converter Card, one of the I/O cards designed for the Smart Star embedded control system.
The Smart Star is a modular and expandable embedded control system whose configuration of I/O, A/D Converter, D/A Converter, and Relay Cards can be tailored to a large variety of demanding real-time control and data acquisition applications. The typical Smart Star system consists of a rugged backplane with a power supply, a CPU card, and one or more I/O cards. The CPU card plugs into a designated slot on the backplane chassis, which has seven additional slots available for I/O cards to be used in any combination. A high-performance Rabbit 2000 microprocessor on the CPU card provides fast data processing.
8.1 A/D Converter Card Features
Three models of A/D Converter Cards are available, as shown in Table 14.
Table 14. Smart Star A/D Converter Cards
I/O Card Model SR9300 A/D Converter SR9310 SR9320 Features 12-bit A/D converter, 11 channels, 0 V - 10 V 12-bit A/D converter, 11 channels, -10 V - +10 V 12-bit A/D converter, 11 channels, 4 mA - 20 mA
User's Manual
87
A/D CONVERTER
8.2 User Interface
Figure 33 shows the circuit used to condition the analog signal before it goes to the A/D converter chip. Depending on the model of A/D Converter Card you have, it is designed to handle analog inputs of 0 V to 10 V, -10 V to +10 V, or 4-20 mA. The two different voltage ranges are handled with different gain resistors, Rg: 23.7 k for the SR9300 and 12.1 k for the SR9310. The input shown in Figure 33 is configured differently for the SR9320, which handles analog inputs of 4-20 mA.
C FB
1 nF
A/D CONVERTER
Rg R IN 100 kW To ADC
Input
VREF
R TOP 10 kW
R BOTTOM
100 nF
Figure 33. Analog Input Amplifier Circuit
The TLC2543 A/D converter chip on the A/D Converter Card uses synchronous Serial Port B and Timer A5 on the Rabbit 2000 to do the A/D conversions. Figure 34 shows the complete pinout for the user interface on header J2. Note that pin 1 is indicated by a small arrow on the ribbon cable connector.
J2
AIN0 GND AIN3 AIN4 GND GND AIN8 AIN9 GND GND AIN1 AIN2 GND AIN5 AIN6 AIN7 GND AIN10 +5 V (ADC) +2.5 V
Figure 34. A/D Converter Card User Interface Pinout
88
Smart Star A/D Converter Cards (SR9300)
8.3 User FWT Connections
Connections to the A/D Converter Cards are made via a ribbon cable connector or optional field wiring terminals that are either pluggable or have screw terminals. Table 15 lists the Rabbit part numbers for the FWTs.
Table 15. Guide to FWT Selection
Rabbit Part Number Pluggable Terminals Screw Terminals
FWT Description
I/O Cards
FWT18
A/D Converter
101-0421
101-0515
8.3.1 Pinouts Figure 35 shows the pinout for the FWTs used on the A/D Converter Cards.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 AIN0 AIN1 GND AIN2 AIN3 GND AIN4 AIN5 GND AIN6 GND AIN7 AIN8 GND AIN9 AIN10 +5 V (ADC) +2.5 V (ADC)
Figure 35. FWT Pinout for A/D Converter Cards
User's Manual
89
A/D CONVERTER
8.4 Power Distribution
Figure 36 shows the power distribution on the A/D Converter Card.
BACKPLANE SLOT 06
20
+5 V
Multiplexer/ Latch +5 V VccADC Precision +2.5 V reference
22
+V_USER
A/D CONVERTER
1, 26
Figure 36. A/D Converter Card Power Distribution
90
Smart Star A/D Converter Cards (SR9300)
8.5 Software
8.5.1 Sample Programs * SSTARAD1.C--Demonstrates how to calibrate an A/D converter channel using two known voltages, and defines the two coefficients, gain and offset. These coefficients are then read back to compute the equivalent voltage. * SSTARAD2.C--Reads and displays voltage and equivalent values of each A/D converter channel. Calibrations must have been previously stored into flash memory before running this program. See sample program SSTARAD3.C. * SSTARAD3.C--Demonstrates how to calibrate all A/D converter channels using two known voltages and defines the two coefficients, gain and offset. These coefficients are then read back to compute the equivalent voltage and are saved to flash memory.
8.5.1.1 Running Sample Programs
To run a sample program, open it with the File menu (if it is not still open), compile it using the Compile menu, and then run it by selecting Run in the Run menu. The CPU Card must be connected to a PC using the programming cable as described in Section 2.3, "Programming Cable Connections." More complete information on Dynamic C is provided in the Dynamic C User's Manual. 8.5.2 Dynamic C Libraries The SMRTSTAR directory contains libraries required to operate the Smart Star control system. * SMRTSTAR.LIB--This library supports all the functions needed by the Smart Star systems including Digital I/O Cards, Relay Cards, D/A Converter and A/D Converter Cards, and serial communication. Other functions applicable to all devices based on the Rabbit 2000 microprocessor are described in the Dynamic C Function Reference Manual.
User's Manual
91
A/D CONVERTER
8.5.3 Smart Star A/D Converter Card Function Calls
int anaInEERd(int channel);
The A/D Converter Card calibration constants, gain, and offset are stored in the factory in the upper half of the EEPROM on the A/D Converter Card. Use this function to read the A/D Converter Card calibration constants, gain, and offset from the upper half of the EEPROM on the A/D Converter Card.
PARAMETERS
channel is the analog input channel. channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
where slotnumber is 0-6, and channelnumber is 0-10
A/D CONVERTER
or
channel = ChanAddr(slotnumber, channelnumber)
where slotnumber is 0-6, and channelnumber is 0-10.
RETURN VALUE
0 if successful. -1--control command unacceptable. -2--EEPROM address unacceptable.
SEE ALSO anaInEEWr
int anaSaveCalib();
The calibration constants may also be saved in the flash memory on the Smart Star CPU Card. Doing so will speed up A/D conversions since a memory access from flash memory will be faster than from EEPROM. Use anaSaveCalib to save the current set of calibration constants for the analog input and output channels in the Smart Star flash memory. The calibration constants stored in flash memory can then be accessed at any time with the anaLoadCalib function. If the factory-set calibration are not used, customer-measured calibration constants should first be established using the anaInCalib function.
RETURN VALUE
None.
SEE ALSO anaLoadCalib, anaInCalib
void anaLoadCalib();
Reads a complete set of calibration constants for the analog input and output channels from the Smart Star flash memory on the CPU Card. These should be set using the anaInCalib or anaInEERd function, then saved to flash memory using the anaSaveCalib function.
RETURN VALUE
None.
SEE ALSO anaSaveCalib, anaInCalib
92
Smart Star A/D Converter Cards (SR9300)
int anaInCalib(int channel, int value1, float volt1, int value2, float volt2);
Used to recalibrate the response of the A/D converter channel as a linear function using the two conversion points provided. Gain and offset constants are calculated and placed into the global table _adcCalib.
PARAMETERS
channel is the A/D converter input channel (0-10). channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
where slotnumber is 0-6, and channelnumber is 0-10 or
channel = ChanAddr(slotnumber, channelnumber)
where slotnumber is 0-6, and channelnumber is 0-10. value1 is the first A/D converter value. volt1 is the voltage/current corresponding to the first A/D converter value. Current values entered as milliamps will produce milliamp values, and amp values entered will produce amp values. value2 is the second A/D converter value. volt2 is the voltage/current corresponding to the second A/D converter value. Current values entered as milliamps will produce milliamp values, and amp values entered will produce amp values.
RETURN VALUE
0 if successful, -1, if not able to make calibration constants.
SEE ALSO anaIn, anaInVolts
int anaInEEWr(int channel);
Writes the calibration constants, gain, and offset to the upper half of the EEPROM on the A/D Converter Card.
PARAMETERS
channel is the analog input channel. channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
where slotnumber is 0-6, and channelnumber is 0-10 or
channel = ChanAddr(slotnumber, channelnumber)
where slotnumber is 0-6, and channelnumber is 0-10.
RETURN VALUE
0 if successful. -1--control command unacceptable. -2--EEPROM address unacceptable. -3--data value unacceptable.
SEE ALSO anaInEERd, _anaInEEWr User's Manual 93
A/D CONVERTER
unsigned int anaIn(unsigned int channel);
Reads the state of an analog input channel and converts it to a digital value. A timeout occurs, causing the function to exit, if the end of the conversion is not detected within 13 s.
PARAMETERS
channel is the analog input channel to read. channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
where slotnumber is 0-6, and channelnumber is 0-10 or
channel = ChanAddr(slotnumber, channelnumber)
where slotnumber is 0-6, and channelnumber is 0-10.
A/D CONVERTER
RETURN VALUE
A value corresponding to the voltage on the analog input channel, 0-4095. A value outside this range indicates a failure
SEE ALSO anaInCalib, anaInVolts
int anaInVolts(int channel);
Reads the state of an analog input channel and uses the previously set calibration constants to convert the state to volts.
PARAMETERS
channel is the analog input channel. channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
where slotnumber is 0-6, and channelnumber is 0-10 or
channel = ChanAddr(slotnumber, channelnumber)
where slotnumber is 0-6, and channelnumber is 0-10.
RETURN VALUE
A voltage value corresponding to the voltage on the analog input channel (0-+10 V on the SR9300 or -10-+10 V on the SR9310).
SEE ALSO anaIn, anaInCalib, anaInmAmps
94
Smart Star A/D Converter Cards (SR9300)
float anaInmAmps(unsigned int channel);
Reads the state of an analog input channel and uses the previously set calibration constants to convert the state to current. NOTE: The factory-set calibration constants are for current measurements in amperes.
PARAMETERS
channel is the analog input channel. channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
where slotnumber is 0-6, and channelnumber is 0-10 or where slotnumber is 0-6, and channelnumber is 0-10.
RETURN VALUE
A current value corresponding to the 4-20 mA (0.004-0.020 A) current on the analog input channel.
SEE ALSO anaIn, anaInCalib, anaInVolts
User's Manual
95
A/D CONVERTER
channel = ChanAddr(slotnumber, channelnumber)
8.6 Electrical and Mechanical Specifications
Figure 37 shows the mechanical dimensions for the A/D Converter Card.
3.00
(76)
1.19
(48)
A/D CONVERTER
J2
R1 C1
U1
C3
U3
U5
U2
U4
16 C4 1 11
U6 C9
C10
C2
Figure 37. Relay Card Dimensions
NOTE: All diagram and graphic measurements are in inches followed by millimeters enclosed in parentheses.
96
+
J1
R2
+
C6
C7
C8
6
+
+ R5 C13 R4 C12 R3
C11
Smart Star A/D Converter Cards (SR9300)
+
2.73
(70)
C5
2.49
C14
(63)
Table 16 lists the electrical, mechanical, and environmental specifications for the A/D Converter Card.
Table 16. A/D Converter Card Specifications
Parameter Board Size Connectors Operating Temperature Humidity Power Requirements Number of Inputs Analog Input Ranges* Resolution Conversion Time (including Dynamic C) Repeatability Specification 2.73" x 3.00" x 0.44" (70 mm x 76 mm x 11 mm) one 2 x 10 latch/eject ribbon connector, 0.1 inch pitch -40C to +70C 5% to 95%, noncondensing 5 V DC at 40 mA from backplane (+5 V supply) 9 V to 30 V DC, 35 mA at 24 V DC, +RAW/+V_USER from backplane 11 conditioned channels 0 V to +10 V (max. 22 V DC) -10 V to +10 V (max. 40 V DC) 4 mA to 20 mA (max. 30 mA) 12 bits (0-4095) 0.13 ms/channel (includes 0.08 ms/channel for raw count) Typical 1/2 count, maximum 1 count @ -20C to +70C Typical 1 count, maximum 2 counts @ -40C to -20C Typical 1 count, maximum 2 counts @ 25C 4 counts @ -40C and +70C SR9300 (0 V to +10 V): 100 k min. SR9310 (-10 V to +10 V): 100 k min. SR9320 (4 mA to 20 mA): 249 1% 1 count
Accuracy
Input Impedance Linearity Error (end to end)
* The A/D Converter Card is protected against transients that might exceed the maximum ratings. Accuracy at temperature extremes can be improved by recalibrating the A/D Converter Card at the temperature it will be used at.
User's Manual
97
A/D CONVERTER
A/D CONVERTER
98
Smart Star A/D Converter Cards (SR9300)
PART IV. D/A CONVERTER CARDS
User's Manual
99
D/A CONVERTER
D/A CONVERTER
Smart Star D/A Converter Cards (SR9400)
9. D/A CONVERTER CARDS
Chapter 9 describes the features of the D/A Converter Card, one of the I/O cards designed for the Smart Star embedded control system.
The Smart Star is a modular and expandable embedded control system whose configuration of I/O, A/D Converter, D/A Converter, and Relay Cards can be tailored to a large variety of demanding real-time control and data acquisition applications. The typical Smart Star system consists of a rugged backplane with a power supply, a CPU card, and one or more I/O cards. The CPU card plugs into a designated slot on the backplane chassis, which has seven additional slots available for I/O cards to be used in any combination. A high-performance Rabbit 2000 microprocessor on the CPU card provides fast data processing.
9.1 D/A Converter Card Features
Three models of D/A Converter Cards are available, as shown in Table 17.
Table 17. Smart Star D/A Converter Cards
I/O Card Model SR9400 D/A Converter SR9410 SR9420 Features 12-bit D/A converter, 8 channels, 0 V - 10 V 12-bit D/A converter, 8 channels, -10 V - +10 V 12-bit D/A converter, 8 channels, 4 mA - 20 mA
User's Manual
101
D/A CONVERTER
9.2 User Interface
Figure 38 shows the D/A converter circuit. A buffer, U6, buffers the data signals D0-D7 from the Smart Star backplane, and sends them to the D/A converter, U2-U5. Signals D2- D5 are used to switch the chip select line to identify which D/A converter will perform the conversion. The model of D/A Converter Card determines the analog output ranges (0 V to 10 V, -10 V to +10 V, or 4-20 mA). The different voltage or current ranges are handled with different feedback resistors, as shown in Figure 38. A switching regulator provides a regulated power supply for the op-amps.
33 pF
SR9400/SR9410
+5 V
825 kW
D/A _SEN[07]
U2U5 DA_DATA DA_CLK
DIN SCLK /CS
DAC
165 kW
OUT
+
U10
100 W 0W
D/A _OUT[07]
D/A CONVERTER
33 pF
SR9420
DA_DATA DA_CLK
+5 V
8.25 kW
U2U5
DIN SCLK /CS
DAC
OUT
165 kW 165 kW
+
U10
0W 10 W
8.25 kW
D/A _OUT[07]
Figure 38. D/A Converter Card Circuit
NOTE: The D/A_SEN[0-7] sensing inputs are not used when using the current source version (model SR9420) of the D/A Converter Card.
102
Smart Star D/A Converter Cards (SR9400)
Figure 39 shows the complete pinout for the user interface on header J1. Note that pin 1 is indicated by a small arrow on the ribbon cable connector.
J1
D/A_SEN0 D/A_SEN1 D/A_SEN2 D/A_SEN3 D/A_SEN4 AGND D/A_SEN5 D/A_SEN6 AGND AGND D/A_OUT0 D/A_OUT1 GND D/A_OUT2 D/A_OUT3 D/A_OUT4 D/A_OUT5 D/A_OUT6 D/A_OUT7 D/A_SEN7
Pin 1
Figure 39. D/A Converter Card User Interface Pinout
Let's look at Figure 40 to see how this happens. Assume the load is 500 . If the impedance of the wire used to connect the load to the output terminal on the D/A Converter Card is 5 , there will be a voltage drop of about 5 /500 = 1% across the wire. The voltage across the load will then be 1% less, which is about 40 counts for the SR9400. By connecting D/A_SEN as shown in Figure 40, the output driver will be able to sense the voltage drop across the wire and provide a more accurate voltage output across the load. If the load impedance is much greater than the impedance of the wire leads, simply leave the D/A_SEN sensing inputs open.
33 pF 825 kW
D/A _SEN[07]
+
U10
100 W 0W 5W 5W
D/A _OUT[07]
500 W
Figure 40. D/A Converter Output for Low-Impedance Loads
User's Manual
103
D/A CONVERTER
The D/A Converter Card has eight analog output channels, D/A_OUT[0-7], and is also equipped with a remote sensing capability through sensing inputs D/A_SEN[0-7] for the voltage-amplifier versions of the D/A Converter Card (models SR9400 and SR9410). These sensing inputs compensate for the voltage drop across the wire leads of low-impedance loads to provide a more precise output across the load.
9.3 User FWT Connections
Connections to the D/A Converter Cards are made via a ribbon cable connector or optional field wiring terminals that are either pluggable or have screw terminals. Table 18 lists the Rabbit part numbers for the FWTs.
Table 18. Guide to FWT Selection
Rabbit Part Number Pluggable Terminals Screw Terminals
FWT Description
I/O Cards
FWT18
D/A Converter
101-0421
101-0515
9.3.1 Pinouts D/A CONVERTER Figure 41 shows the pinout for the FWTs used on the D/A Converter Cards.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 D/A_SEN0 D/A_OUT0 D/A_SEN1 D/A_OUT1 D/A_SEN2 GND D/A_SEN3 D/A_OUT2 D/A_SEN4 D/A_OUT3 GND D/A_OUT4 D/A_SEN5 D/A_OUT5 D/A_SEN6 D/A_OUT6 D/A_OUT7 D/A_SEN7
Figure 41. FWT Pinout for D/A Converter Cards
104
Smart Star D/A Converter Cards (SR9400)
9.4 Power Distribution
Figure 42 shows the power distribution on the D/A Converter Card.
BACKPLANE SLOT 06
20
+5 V
Multiplexer/ Latch +4.096 V DAC reference
22
+V_USER
12 V voltage regulators
1, 26
Figure 42. D/A Converter Card Power Distribution
U1 +12 V Reg +V_USER
IN OUT GND
OFF/ON control +12 V
U9 SR9410 only 12 V Reg
IN OUT GND
12 V
Figure 43. Op-Amp Power Supplies
There is provision in software using the anaOutDisable or the anaOutEnable function calls to turn the regulated 12 V power supply off or on since pin 5 on U1 is connected to PE7 on the Rabbit 2000 microprocessor on the backplane. This type of disabling/enabling allows the analog output channels to float in a high-impedance state. The voltage regulator on/off is disabled by default when there is a reset or when the D/A Converter Card is first used. All output channels must be configured to the required voltage or current outputs before calling the anaOutEnable function since unconfigured channels are automatically set to the maximum output. The -12 V supply is provided only for the SR9410, which provides analog outputs up to 10 V.
User's Manual 105
D/A CONVERTER
Figure 43 shows the power supply for the op-amps used as voltage amplifiers/current sources.
9.5 Software
9.5.1 Sample Programs * ANAVOUT.C--Demonstrates how to set the D/A channel for the desired output. * SSDAC1.C--Demonstrates how to recalibrate a D/A converter channel using two known voltages, and shows how to define the two coefficients, gain and offset, that will be rewritten into the D/A Converter Card's EEPROM. * SSDAC2.C--Demonstrates how to recalibrate a D/A converter channel using an A/D Converter Card andtwo known voltages. Shows how to define the two coefficients, gain and offset, that will be rewritten into the D/A Converter Card's EEPROM. * SSDAC3.C--Demonstrates how to recalibrate a D/A converter channel using two known currents, and shows how to define the two coefficients, gain and offset, that will be rewritten into the D/A Converter Card's EEPROM. * SSDAC4.C--Demonstrates how to recalibrate a D/A converter channel using an A/D Converter Card,two known currents. Shows how to define the two coefficients, gain and offset, that will be rewritten into the D/A Converter Card's EEPROM.
9.5.1.1 Running Sample Programs
D/A CONVERTER
To run a sample program, open it with the File menu (if it is not still open), compile it using the Compile menu, and then run it by selecting Run in the Run menu. The CPU Card must be connected to a PC using the programming cable as described in Section 2.3, "Programming Cable Connections." More complete information on Dynamic C is provided in the Dynamic C User's Manual. 9.5.2 Dynamic C Libraries The SMRTSTAR directory contains libraries required to operate the Smart Star control system. * SMRTSTAR.LIB--This library supports all the functions needed by the Smart Star systems including Digital I/O Cards, Relay Cards, A/D Converter and D/A Converter Cards, and serial communication. Other functions applicable to all devices based on the Rabbit 2000 microprocessor are described in the Dynamic C Function Reference Manual.
106
Smart Star D/A Converter Cards (SR9400)
9.5.3 Smart Star D/A Converter Card Function Calls
void anaOutDisable(void);
Turns off (disables) voltage regulator for output-channel op-amps on all D/A Converter Cards, leaving all output channels in a high-impedance state.
RETURN VALUE
None.
See Also
anaOutEnable, anaOut, anaOutVolts, anaOutmAmps
void anaOutEnable(void);
Turns on (enables) voltage regulator for output-channel op-amps on all D/A Converter Cards.
NOTE: The voltage regulator on/off is disabled (off) at power-up or reset. All output channels must be configured to the required voltage or current outputs before calling the anaOutEnable function since unconfigured channels will be set automatically to the maximum output.
None.
SEE ALSO anaOutDisable, anaOut, anaOutVolts, anaOutmAmps
int anaOutEERd(int channel);
The D/A Converter Card calibration constants, gain, and offset are stored in the factory in the upper half of the EEPROM on the D/A Converter Card. Use this function to read the D/A Converter Card calibration constants into the global table _dacCalib
PARAMETERS
channel is the D/A converter output channel. channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
where slotnumber is 0-6, and channelnumber is 0-7 or
channel = ChanAddr(slotnumber, channelnumber)
where slotnumber is 0-6, and channelnumber is 0-7.
RETURN VALUE
0 if successful. -1--control command unacceptable. -2--EEPROM address unacceptable.
SEE ALSO anaOutEEWr
User's Manual
107
D/A CONVERTER
RETURN VALUE
int anaOutCalib(int channel, int value1, float voltamp1, int value2, float voltamp2);
Calibrates the response of the desired D/A converter channel as a linear function using the two conversion points provided. Gain and offset constants are calculated and placed into global table _dacCalib.
PARAMETERS
channel is the D/A converter output channel. channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
where slotnumber is 0-6, and channelnumber is 0-7 or
channel = ChanAddr(slotnumber, channelnumber)
where slotnumber is 0-6, and channelnumber is 0-7. value1 is the first D/A conversion data point. Use a value near 4095 to produce a lower output measurement. voltamp1 is the voltage/current measurement corresponding to the first D/A converter value. Current values entered as milliamps will produce milliamp values, and amp values entered will produce amp values. value2 is the second D/A conversion data point. Use a value near 0 to produce a higher output measurement.
D/A CONVERTER
voltamp2 is the voltage/current measurement corresponding to the second D/A converter value. Current values entered as milliamps will produce milliamp values, and amp values entered will produce amp values.
Approximate Output Equivalent rawcount SR9400 0 (0000H) 2047 (07FFH) 4095 (0FFFH)
RETURN VALUE
SR9410 +10 V 0V -10 V
SR9420 20 mA 12 mA 4 mA
+10 V +5 V 0V
0 if successful. -1 if not able to make calibration constants.
SEE ALSO anaOut, anaOutVolts, anaOutmAmps
108
Smart Star D/A Converter Cards (SR9400)
int anaSaveCalib(int boardtype);
The calibration constants may also be saved in the flash memory on the Smart Star CPU Card. Doing so will speed up D/A conversions since a memory access from flash memory will be faster than from EEPROM. Use anaSaveCalib to save the current set of calibration constants for the analog input or output channels in the Smart Star flash memory. The calibration constants stored in flash memory can then be accessed at any time with the anaLoadCalib function. Calibration constants should first be established using anaOutCalib or obtained via anaOutEERd.
PARAMETER
boardtype is the type of board, which is 0 for the D/A Converter Card, 1 for the A/D Converter Card.
RETURN VALUE
0 if successful. -1--attempt to write non-flash area, nothing written. -2--rootSrc not in root. -3--timeout while writing flash memory. -4--attempt to write to ID block sector(s).
SEE ALSO anaLoadCalib, anaOutCalib
Reads a complete set of calibration constants for the analog output channels from the Smart Star flash memory on the CPU Card. These should have been loaded to the flash memory with the anaSaveCalib function.
PARAMETER
boardtype is the type of board, which is 0 for the D/A Converter Card, 1 for the A/D Converter Card.
RETURN VALUE
0 if successful. -1--attempt to read from non-flash area. -2--destination not all in root.
SEE ALSO anaSaveCalib, anaOutCalib
User's Manual
109
D/A CONVERTER
int anaLoadCalib(int boardtype);
int anaOut(unsigned int channel, unsigned int rawcount);
Sets the voltage of an analog output channel by serially clocking in 16 bits to a D/A converter using the following format:
* Program bits (D15...D12) * New data (D11...D0)
D15 D14 D13 D12 D11 D10 R1 SPD PWR R0 MSB D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 LSB
12 data bits MSB-LSB (0-4095)
SPD--Speed control bit: 1 = fast mode (default), 0 = slow mode PWR--Power control bit: 1 = power down, 0 = normal operation (default) The following table lists all the possible combinations of the register-selects bits R1 (Register 1) and R0 (Register 0)
R1 0 0 R0 0 1 0 1 Register Write data to D/A converter channel B Write data to buffer Write data to D/A converter channel A Reserved
D/A CONVERTER
1 1
PARAMETERS
channel is the D/A converter output channel to write. channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
where slotnumber is 0-6, and channelnumber is 0-7 or
channel = ChanAddr(slotnumber, channelnumber)
where slotnumber is 0-6, and channelnumber is 0-7. rawcount is a value corresponding to the voltage on the analog output channel (0-4095). The following rawcount data correspond to the analog outputs indicated. Approximate Output Equivalent rawcount SR9400 0 (0000H) 2047 (07FFH) 4095 (0FFFH)
RETURN VALUE
SR9410 +10 V 0V -10 V
SR9420 20 mA 12 mA 4 mA
+10 V +5 V 0V
0 if successful. -1 if rawcount is greater than 4095.
SEE ALSO anaOutVolts, anaOutCalib 110 Smart Star D/A Converter Cards (SR9400)
void anaOutVolts(unsigned int channel, float voltage);
Sets the voltage of an analog output channel by using the previously set calibration constants to calculate correct data values.
PARAMETERS
channel is the D/A converter output channel. channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
where slotnumber is 0-6, and channelnumber is 0-7 or
channel = ChanAddr(slotnumber, channelnumber)
where slotnumber is 0-6, and channelnumber is 0-7. voltage is the voltage desired on the output channel.
RETURN VALUE
None.
SEE ALSO anaOut, anaOutCalib, anaOutmAmps
void anaOutmAmps(unsigned int channel, float current);
Sets the current of an analog output channel by using the previously set calibration constants to calculate correct data values. NOTE: The factory-set calibration constants are for current measurements in amperes.
PARAMETERS
channel is the D/A converter output channel. channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
where slotnumber is 0-6, and channelnumber is 0-7 or
channel = ChanAddr(slotnumber, channelnumber)
where slotnumber is 0-6, and channelnumber is 0-7. current is the current range (4-20 mA or 0.004-0.020 A) desired on the output channel.
RETURN VALUE
0 if successful. -1 if not able to make calibration constants.
SEE ALSO anaOut, anaOutVolts, anaOutCalib
User's Manual
111
D/A CONVERTER
int anaOutEEWr(int channel);
Writes the calibration constants, gain, and offset to the upper half of the EEPROM on the D/A Converter Card.
PARAMETERS
channel is the D/A converter output channel. channel should be passed as
channel = (slotnumber * 128) + (channelnumber)
where slotnumber is 0-6, and channelnumber is 0-7 or
channel = ChanAddr(slotnumber, channelnumber)
where slotnumber is 0-6, and channelnumber is 0-7. voltage is the voltage desired on the output channel.
RETURN VALUE
0 if successful. -1--control command unacceptable. -2--EEPROM address unacceptable. -3--data value unacceptable.
SEE ALSO anaOutEERd
D/A CONVERTER
112
Smart Star D/A Converter Cards (SR9400)
9.6 Electrical and Mechanical Specifications
Figure 44 shows the mechanical dimensions for the D/A Converter Card.
3.00
(76)
1.19
(48)
J1
C1
U4
U3
U5
C2 U2
C3
C4
C5
U1
C6
L1
C8
U6
U7 C9 R1 R2
U8
R3
R4
+
C10
C11
C7
D2 U9
C12
L2
Figure 44. D/A Converter Card Dimensions
NOTE: All diagram and graphic measurements are in inches followed by millimeters enclosed in parentheses.
User's Manual
+
J2
D4
C13
C14 D3
113
D/A CONVERTER
R5
2.73
(70)
D1 +
2.49
(63)
+
Table 19 lists the electrical, mechanical, and environmental specifications for the D/A Converter Card.
Table 19. D/A Converter Card Specifications
Parameter Board Size Connectors Operating Temperature Humidity Power Requirements Number of Outputs Analog Output Ranges Specification 2.73" x 3.00" x 0.44" (70 mm x 76 mm x 11 mm) one 2 x 10 latch/eject ribbon connector, 0.1 inch pitch -40C to +70C 5% to 95%, noncondensing 5 V DC at 50 mA typical from backplane (+5 V supply) 15 V to 30 V DC, 30 mA at 24 V DC, +RAW/+V_USER from backplane 8 channels SR9400: 0 V to +10 V, 20 mA/channel (maximum) SR9410: -10 V to +10 V, 20 mA/channel (maximum) SR9420: 4 mA to 20 mA, 10 V (maximum) 12 bits (0-4095) 0.2 ms/channel 1/2 count SR9400: < 1 , SR9410: < 1 , SR9420: > 100 k
D/A CONVERTER
Resolution Conversion Time (including Dynamic C) Output Stability Output Impedance
114
Smart Star D/A Converter Cards (SR9400)
PART V. RELAY CARDS
User's Manual
115
RELAY CARDS
RELAY CARDS
Smart Star Relay Cards (SR9500)
10. RELAY CARDS
Chapter 10 describes the features of the Relay Card, one of the I/O cards designed for the Smart Star embedded control system.
The Smart Star is a modular and expandable embedded control system whose configuration of I/O, A/D Converter, D/A Converter, and Relay Cards can be tailored to a large variety of demanding real-time control and data acquisition applications. The typical Smart Star system consists of a rugged backplane with a power supply, a CPU card, and one or more I/O cards. The CPU card plugs into a designated slot on the backplane chassis, which has seven additional slots available for I/O cards to be used in any combination. A high-performance Rabbit 2000 microprocessor on the CPU card provides fast data processing.
10.1 Relay Card Features
Two models of Relay Cards are available, as shown in Table 20.
Table 20. Smart Star Relay Cards
I/O Card Model SR9500 Relay SR9510 Features 5 SPST relays and 1 SPDT relay, each protected with onboard snubbers 8 SPDT relays (no snubbers)
The SR9500 Relay Cards are suitable for switching all kinds of loads up to 30 V DC at 1 A or 48 V AC at 0.5 A. The SR9510 handles similar loads, but is restricted to noninductive loads unless you add snubbers to the system that is interfacing with the Smart Star.
User's Manual
117
RELAY CARDS
10.2 User Interface
Depending on the model of Relay Card (see Table 20), the relays on the Relay Card will be configured as SPDT or SPST with or without snubbers. Figure 45 shows these relay configurations.
+V
COM NO NC
8 7 1
(no snubbers)
9 10
SPDT
RELDRV
COM NO
+V
100 nF 8 47 W 7 1
100 nF
47 W
9
10
RELDRV
(with snubbers)
SPDT
NC
+V
COM NO
100 nF 8 47 W 7 9 10 1
RELDRV
(with snubbers)
SPST
Figure 45. Relay Configurations
The diode protects the coil power supply (and the Smart Star backplane) from inductive spikes caused by energizing/de-energizing the coil, and the resistor-capacitor snubbers protect the relay contacts against voltage spikes induced by inductive loads. Figure 46 shows the complete pinout for the user interface on header J1. Note that pin 1 is indicated by a small arrow on the ribbon cable connector.
SR9500
J1
GND REL0NO REL0COM REL1NO REL1COM REL2NO REL2COM REL3NO GND REL3COM REL4NO REL4COM GND REL5NO REL5COM GND GND REL0NO REL0COM GND REL1NO REL1COM GND REL2NO REL2COM REL3NO REL3COM REL4NO REL4COM REL5NO REL5COM REL5NC REL5NC
RELAY CARDS
SR9510
J1
GND REL0COM REL1NO REL1COM REL2NO REL2NC REL3NO REL3NC GND REL4NC REL5COM REL6NO GND REL7NO REL7NC GND REL0NO REL0NC GND REL1NC REL2COM GND REL3COM REL4NO REL4COM REL5NO REL5NC REL6COM REL6NC REL7COM
Figure 46. Relay Card User Interface Pinout
118
Smart Star Relay Cards (SR9500)
10.3 User FWT Connections
Connections to the Relay Cards are made via a ribbon cable connector or optional field wiring terminals that are either pluggable or have screw terminals. Table 21 lists the Rabbit part numbers for the FWTs.
Table 21. Guide to FWT Selection
Rabbit Part Number Pluggable Terminals FWT Description I/O Cards Screw Terminals
FWT18R FWT27
Relay (SR9500) Relay (SR9510)
101-0422 101-0420
101-0516 101-0514
10.3.1 Pinouts Figure 47 shows the pinout for the FWTs used on the Relay Cards.
FWT18R
SR9500 6-relay card
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
FWT27
SR9510 8-relay card
GND REL0NO REL0COM REL0NC REL1NO REL1COM REL1NC REL2NO REL2COM REL2NC REL3NO REL3COM REL3NC REL4NO REL4COM REL4NC REL5NO REL5COM REL5NC REL6NO REL6COM REL6NC REL7NO REL7COM REL7NC GND
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
REL0NO REL0COM GND REL1NO REL1COM GND REL2NO REL2COM GND REL3NO REL3COM GND REL4NO REL4COM GND REL5NO REL5COM REL5NC
Figure 47. FWT Pinouts for Relay Cards
User's Manual 119
RELAY CARDS
10.4 Power Distribution
Figure 48 shows the power distribution on the Relay Card.
BACKPLANE SLOT 06
20
+5 V
Multiplexer/ Latch +12 V linear regulator Comparator
+12 V coil actuation voltage
22
+V_USER
1, 25
Figure 48. Relay Card Power Distribution
The relay coil actuation voltage is 12 V, and so +V_USER should be 12 V to 30 V DC. The +V_USER supply passes through a linear regulator and comparator, which are in parallel. The comparator is set for approximately +13.9 V, and as long as +V_USER is more than +13.9 V, the +12 V from the linear regulator will provide the coil actuation voltage. Should +V_USER be less than +13.9 V, the comparator will supply +V_USER directly to provide the coil actuation voltage.
RELAY CARDS
120
Smart Star Relay Cards (SR9500)
10.5 Relay Cards Software
10.5.1 Sample Programs * SSTARRLY.C--Demonstrates turning a relay on the Relay Card on and off. 10.5.2 Running Sample Programs To run a sample program, open it with the File menu (if it is not still open), compile it using the Compile menu, and then run it by selecting Run in the Run menu. The CPU Card must be connected to a PC using the programming cable as described in Section 2.3, "Programming Cable Connections." Complete information on Dynamic C is provided in the Dynamic C User's Manual. 10.5.3 Dynamic C Libraries The SMRTSTAR directory contains libraries required to operate the Smart Star control system. * SMRTSTAR.LIB--This library supports all the functions needed by the Smart Star systems including Digital I/O Cards, Relay Cards, D/A Converter and A/D Converter Cards, and serial communication.
User's Manual
121
RELAY CARDS
10.5.4 Smart Star Relay Card Function Calls
void relayOut(int relay, int value);
Sets the state of a relay.
PARAMETER
relay is the relay to set. relay should be passed as
relay = (slotnumber * 128) + (relaynumber)
or
relay = ChanAddr(slotnumber, relaynumber)
where slotnumber is 0-6, and relaynumber is 0-5 (SR9500) or 0-7 (SR9510), depending on the model of Relay Card. value is the value to set the relay to, 0 or 1 (off or on).
RELAY CARDS
122
Smart Star Relay Cards (SR9500)
10.6 Electrical and Mechanical Specifications
Figure 49 shows the mechanical dimensions for the Relay Card.
3.00
(76)
1.88
(48)
2 1
K1
1
10
J1
C1
34 33
K3
1
10
C3
K5
1
10
R5 C5
K2
1
10
R1 C2
K4
R3 C4
1
10
K6
1
10
C6 C7 R7
5
6
R2
5
6
2
J2
+ 26
R4 C8
5
6
U1
C9 D1
Figure 49. Relay Card Dimensions
NOTE: All diagram and graphic measurements are in inches followed by millimeters enclosed in parentheses.
2.73
(70)
5
6
5
6
5
6
(63)
R6
2.49
User's Manual
123
RELAY CARDS
Table 22 lists the electrical, mechanical, and environmental specifications for the Relay Card.
Table 22. Relay Card Specifications
Parameter Board Size Connectors Operating Temperature Humidity Power Requirements Relay Switching Contacts Relays Specification 2.73" x 3.00" x 0.44" (70 mm x 76 mm x 11 mm) one 2 x 17 latch/eject ribbon connector, 0.1 inch pitch -40C to +70C 5% to 95%, noncondensing 5 V DC at 10 mA from backplane (+5 V supply) 12 V to 30 V DC, 10 mA at 24 V DC, +RAW/+V_USER from backplane 30 V DC at 1 A or 48 V AC at 0.5 A SR9500: 1 SPDT, 5 SPST (N.O., COM) with snubbers SR9510: 8 SPDT (N.O., N.C., COM), no snubbers
RELAY CARDS
124
Smart Star Relay Cards (SR9500)
PART VI. APPENDICES
User's Manual
125
APPENDICES
APPENDICES
Smart Star (SR9000)
APPENDIX A. FIELD WIRING TERMINALS
Appendix A explains how to prepare the connector on an I/O card to accept a field wiring terminal, and how to secure the field wiring terminal to the I/O card. The dimensions for the field wiring terminals are included.
User's Manual
127
APPENDICES
A.1 Selecting and Installing a Field Wiring Terminal
Connections to the I/O cards are made via a ribbon cable connector or optional field wiring terminals that are either pluggable or have screw terminals. Three different Field Wiring Terminals (FWTs) are available. Table A-1 lists the I/O cards and the Rabbit part numbers for the corresponding FWTs.
Table A-1. Guide to FWT Selection
Rabbit Part Number Pluggable Terminals FWT Description I/O Cards Screw Terminals
FWT27 FWT18 FWT18R
Digital I/O (SR9200 series) Relay (SR9510) A/D Converter (SR9300 series) D/A Converter (SR9400 series) Relay (SR9500)
101-0420 101-0421 101-0422
101-0514 101-0515 101-0516
Before you can install the FWT you selected for your I/O card, you must remove the tabs 1 from the connector on the I/O card. To do so, move the tab inwards as far as possible, as 2 shown in Figure A-1. Then insert a screwdriver into the space below the tab on the side of the connector and gently nudge the tab up and out. If you are careful, the tab will Figure A-1. Remove Tabs from Connector remain intact to be saved and snapped back on I/O Card in place should you need to use a ribbon cable connector in the future. Plug the FWT connector into the connector on the I/O card. Be sure to position the pluggable or screw connectors so that the header pins on the printed circuit board are towards you, as shown in Figure A-2. Position the mylar insulator above the FWT as shown in Figure A-2 to protect the header pins on the printed circuit board, and secure the FWT using the two 4-40 x 1/4 screws supplied. them. Note that the mylar insulator will be bowed slightly once the screws are in place.
128
Pin 1
Mylar insulator
Pin 1
APPENDICES
Figure A-2. Secure FWT to I/O Card
Smart Star (SR9000)
A.2 Dimensions
Figure A-3 shows the overall FWT dimensions.
0.725
(18.5)
0.125 0.725
(18.5)
2.75
(70)
(3.2)
(107)
4.20
Figure A-3. FWT Dimensions
NOTE: All diagram and graphic measurements are in inches followed by millimeters enclosed in parentheses.
The actual appearance of the terminals may vary, depending on the number and type of terminals. The pinouts for the FWTs applicable to a particular I/O card are shown with the pinouts for the connectors on the individual I/O cards.
User's Manual
129
APPENDICES
APPENDICES
130
Smart Star (SR9000)
APPENDIX B. LCD/KEYPAD MODULE
An optional LCD/keypad module with a NEMA 4 water-resistant bezel is available for the Smart Star. Appendix B describes the LCD/keypad module and provides the software function calls to make full use of the LCD/keypad module. B.1 Specifications
The LCD/keypad module comes with or without a panel-mounted NEMA 4 water-resistant bezel as shown in Figure B-1.
LCD/Keypad Modules
Figure B-1. LCD/Keypad Module Versions
Either version can be connected to the Smart Star backplane, and can be installed at a remote location up to 60 cm (24") away. Contact your Rabbit sales representative or your authorized distributor for further assistance in purchasing an LCD/keypad module. APPENDICES Mounting hardware and a 60 cm (24") extension cable are also available for the LCD/keypad module through your sales representative or authorized distributor.
User's Manual 131
Table B-1 lists the electrical, mechanical, and environmental specifications for the LCD/ keypad module.
Table B-1. LCD/Keypad Specifications
Parameter Board Size Bezel Size Temperature Humidity Power Consumption Connections LCD Panel Size Keypad LEDs Specification 2.60" x 3.00" x 0.75" (66 mm x 76 mm x 19 mm) 4.50" x 3.60" x 0.30" (114 mm x 91 mm x 7.6 mm) Operating Range: 0C to +50C Storage Range: -40C to +85C 5% to 95%, noncondensing 1.5 W maximum* Connects to high-rise header sockets on Smart Star 122 x 32 graphic display 7-key keypad Seven user-programmable LEDs
* The backlight adds approximately 650 mW to the power consumption.
NOTE: All measurements are in inches followed by millimeters enclosed in parentheses. All dimensions have a manufacturing tolerance of 0.01" (0.25 mm).
0.768
(19.5)
0.607
(15.4)
The LCD/keypad module has 0.1" IDC headers at J1, J2, and J3 for physical connection to other boards or ribbon cables. Figure B-2 shows the LCD/keypad module footprint. These values are relative to one of the mounting holes.
0.100
(2.5)
J1
1.600
(40.6)
J2
J3
0.200
(5.1)
0.500
(12.7)
1.450
(36.8)
2.200
(55.9)
APPENDICES
Figure B-2. User Board Footprint for LCD/Keypad Module
132
Smart Star (SR9000)
B.2 Contrast Adjustments for All Boards
Starting in 2005, LCD/keypad modules were factory-configured to optimize their contrast based on the voltage of the system they would be used in. Be sure to select a KDU5V LCD/keypad module for use with the Smart Star -- these modules operate at 5 V. You may adjust the contrast using the potentiometer at R2 as shown in Figure B-3. LCD/keypad modules configured for 3.3 V should not be used with the 5 V Smart Star because the higher voltage will reduce the backlight service life dramatically.
LCD/Keypad Module Jumper Configurations
Header Description Pins Connected Factory Default
2.8 V J5 3.3 V 5V
12 34 n.c.
x
Contrast Adjustment
C2
R1
C3
C5
R2
D2 C1 C6 C7 R4 R5
D1
JP1 U2
R3
U1
C4 C10
U3 LCD1
C9
CR1 C12 R7 R6
C11 U4
C13
J5
3 4 1 2
Q1 J5 R25 J1
R26 R11 R13 R14 R10 R20 Q3 R19 R9 R12
R15 R18
J5
R17
3 4 1 2
R22
Q4
R21
Q6
Q7 U6
Q2 U5
Q5
OTHER LP3500
3.3 V 2.8 V n.c. = 5 V KP1
Q8 J2
U7 C14 C16 R24 C15
C17
RN1
DISPLAY BOARD
J4
Figure B-3. LCD/Keypad Module Voltage Settings and Contrast Adjustment
You can set the contrast on the LCD display of pre-2005 LCD/keypad modules by adjusting the potentiometer at R2 or by setting the voltage for 5 V by removing the jumper that was installed at the factory across pins 1-2 on header J5 as shown in Figure B-3. Only one of these two options is available on these older LCD/keypad modules.
NOTE: Older LCD/keypad modules that do not have a header at J5 or a contrast adjustment potentiometer at R2 are limited to operate only at 5 V, and will work with the Smart Star. The older LCD/keypad modules are no longer being sold.
Part No. 101-0541
R8
R23
R16
User's Manual
133
APPENDICES
B.3 Keypad Labeling
The keypad may be labeled according to your needs. A template is provided in Figure B-4 to allow you to design your own keypad label insert.
1.10
(28)
2.35
(60)
Figure B-4. Keypad Template
To replace the keypad legend, remove the old legend and insert your new legend prepared according to the template in Figure B-4. The keypad legend is located under the blue keypad matte, and is accessible from the left only as shown in Figure B-5.
Keypad label is located under the blue keypad matte.
Figure B-5. Removing and Inserting Keypad Label
The sample program KEYBASIC.C in the 122x32_1x7 folder in SAMPLES\LCD_KEYPAD shows how to reconfigure the keypad for different applications. APPENDICES
134
Smart Star (SR9000)
B.4 Header Pinouts
Figure B-6 shows the pinouts for the LCD/keypad module.
J1
DB7B DB5B DB3B DB1B A0B A2B GND GND LED6 LED4 LED2 /CS +5BKLT GND DB6B DB4B DB2B DB0B A1B A3B
J2
GND DB7B DB5B DB3B DB1B A0B A2B
J3
GND GND LED6 LED4 LED2 /CS +5BKLT
Figure B-6. LCD/Keypad Module Pinouts
B.4.1 I/O Address Assignments The LCD and keypad on the LCD/keypad module are addressed by the /CS strobe as explained in Table B-2.
Table B-2. LCD/Keypad Module Address Assignment
Address 61C0Exx0-61C0Exx7 61C0Exx8 61C0Exx9 61C0ExxA 61C0ExxB (bits 0-6) 61C0ExxB (bit 7) 61C0ExxC-61C0ExxF Function LCD control LED enable Not used 7-key keypad 7-LED driver LCD backlight on/off Not used
GND LED7 LED5 LED3 LED1 /RES VCC
DB6B DB4B DB2B DB0B A1B A3B GND LED7 LED5 LED3 LED1 /RES VCC
User's Manual
135
APPENDICES
B.5 Mounting LCD/Keypad Module
B.5.1 Installation Guidelines When possible, following these guidelines when mounting the LCD/keypad module. 1. Leave sufficient ventilation space 2. Do not install the LCD/keypad module directly above machinery that radiates a lot of heat (for example, heaters, transformers, and high-power resistors). 3. Leave at least 8" (20 cm) distance from electric power lines and even more from highvoltage devices. 4. When installing the LCD/keypad module near devices with strong electrical or magnetic fields (such as solenoids), allow a least 3" (8 cm), more if necessary. The LCD/keypad module has strong environmental resistance and high reliability, but you can maximize system reliability by avoiding or eliminating the following conditions at the installation site. * Abrupt temperature changes and condensation * Ambient temperatures exceeding a range of 0C to 50C * Relative humidity exceeding a range of 5% to 95% * Strong magnetism or high voltage * Corrosive gases * Direct vibration or shock * Excessive iron dust or salt * Spray from harsh chemicals
APPENDICES
136
Smart Star (SR9000)
B.5.2 Mounting Instructions A bezel and a gasket are included with the LCD/keypad module. When properly mounted in a panel, the LCD/keypad module bezel is designed to meet NEMA 4 specifications for water resistance. Since the LCD/keypad module employs an LCD display, the viewing angle must be considered when mounting the display. Install the LCD/keypad module at a height and angle that makes it easy for the operator to see the screen.
B.5.2.1 Bezel-Mount Installation
This section describes and illustrates how to bezel-mount the LCD/keypad module. Follow these steps for bezel-mount installation. 1. Cut mounting holes in the mounting panel in accordance with the recommended dimensions in Figure B-7, then use the bezel faceplate to mount the LCD/keypad module onto the panel.
0.125 D, 4x
(3)
CUTOUT
0.230
(5.8)
2.870
(72.9)
3.100
(78.8)
Figure B-7. Recommended Cutout Dimensions
2. Carefully "drop in" the LCD/keypad module with the bezel and gasket attached. APPENDICES
User's Manual
0.130
(3.3)
3.400
(86.4)
137
3. Fasten the unit with the four 4-40 screws and washers included with the LCD/keypad module. If your panel is thick, use a 4-40 screw that is approximately 3/16" (5 mm) longer than the thickness of the panel.
Bezel/Gasket
DISPLAY BOARD C1 U1 C2 Q1 R17 U2 C3 C4 U3
D1
J1
R1
Panel
KP1
R2 R10 Q2 R9 J2
R3 R11 Q3
R4
R5 R12
R6 R13 Q5 Q6
R7 R14
R8 R15 R18 Q8 C5 R16
Q4
Q7
RN1
J3 U4
C6
C7
Figure B-8. LCD/Keypad Module Mounted in Panel (rear view)
Carefully tighten the screws until the gasket is compressed and the plastic bezel faceplate is touching the panel. Do not tighten each screw fully before moving on to the next screw. Apply only one or two turns to each screw in sequence until all are tightened manually as far as they can be so that the gasket is compressed and the plastic bezel faceplate is touching the panel.
APPENDICES
138
C8
Smart Star (SR9000)
B.6 Connecting LCD/Keypad Module to Smart Star Backplane
The LCD/keypad module can be located as far as 2 ft. (60 cm) away from the Smart Star backplane, and is connected via a ribbon cable as shown in Figure B-9.
C2
R1
C3
C5
R2
D2 C1 C6 C7 R4 R5
D1
JP1 U2
R3
U1
C4 C10
U3 LCD1
C9
CR1 C12 R7
C11 U4
C13
Q1 J5 R25 R8 R26 R11 R13 R14 R10 R20 Q3 R19 R9 R12 J1
Pin 1
R15 R18
J5
R17
3 4 1 2
R23
R22
Q4
R21
Q6
Q7 U6
Q2 U5
Q5
R16
OTHER LP3500
3.3 V 2.8 V n.c. = 5 V KP1
Q8 J2
U7 C14 C16 R24 C15
C17
RN1
DISPLAY BOARD
J4
Pin 1
LINK ACT LNK ACT RCM CPU
R6
DS1
PWR
V_USER +RAW
GND
Figure B-9. Connecting LCD/Keypad Module to Backplane
User's Manual
139
APPENDICES
Note the locations and connections for pin 1 on both the backplane and the LCD/keypad module.
C1
TVS1
J2
R1
C13
C11
U1
U2
U4
U3
C12
C3
C4
J3
L1
D1
C2
C5
C8
D2
R3
J4
C15
C9
C6
L2
JP1 J1
R4
J5
C10
C7
RN1 C14 R6
The SR9050 backplane can also be panel-mounted behind the LCD/keypad module. 1. Prepare a cutout and install the LCD/keypad module in the cutout as explained in Section B.5.2.1. 2. Use brackets to secure the LCD/keypad module to the panel using the four 4-40 screws and washers included with the LCD/keypad module. The four screw positions are indicated with the number 1 in Figure B-10. If your panel is thick, use a 4-40 screw that is approximately 3/16" (5 mm) longer than the thickness of the panel. 3. Use a ribbon cable to connect header J6 on the backplane to header J1 on the LCD/keypad module. Note the pin 1 positions reflected by the red-colored line in the ribbon cable shown in Figure B-10.
2
1
Bezel/Gasket Bracket
DISPLAY BOARD C1 U1 C2 LINK ACT LNK ACT RCM CPU Q1 U2 C3 C4 U3
1 2
R17
D1
J1
J2
RN1
C8
2
PWR
V_USER +RAW GND
DS1
1
Figure B-10. Install Smart Star Backplane Behind LCD/Keypad Module
4. Secure the Smart Star backplane using four 4-40 x 1/2" or 6-32 x 1/2" screws at the screw positions indicated with the number 2 in Figure B-10. APPENDICES Brackets and ribbon cables are sold separately. Note that only a Smart Star assembly using the SR9050 backplane can be panel-mounted.
140
C1
TVS1
J2
R1
U4
U1
U2
C3
C4
J3
L1
D1
C2
C5
D2
R3
J4
C15
C6
KP1
U3
C8
C9
L2
J1
R4
J5
C10
Panel
Q2
Q3
Q4
Q5
Q6
Q7
J3
C13
C11
U4
C12
JP1
C7
R1
R2
R3
R4
R5
R6
R7
R8
R14
R10
R13
R11
R12
R15
R9
RN1 C14 R6
R18
Q8
C5
R16
C6
C7
2
1
Smart Star (SR9000)
B.7 Sample Programs
The following sample programs are found in the SAMPLES\LCD_Keypad\122x32_1x7 folder. * ALPHANUM.C--Demonstrates how to create messages using the keypad and then displaying them on the LCD display. * COFTERMA.C--Demonstrates cofunctions, the cofunction serial library, and using a serial ANSI terminal such as Hyperterminal from an available COM port connection. * DISPPONG.C--Demonstrates output to LCD display. * DKADEMO1.C--Demonstrates some of the LCD/keypad module font and bitmap manipulation features with horizontal and vertical scrolling, and using the GRAPHIC.LIB library. * FUN.C--Demonstrates drawing primitive features (lines, circles, polygons) using the GRAPHIC.LIB library * KEYBASIC.C--Demonstrates the following keypad functions in the STDIO display window:
- default ASCII keypad return values. - custom ASCII keypad return values. - keypad repeat functionality.
* KEYMENU.C--Demonstrates how to implement a menu system using a highlight bar on a graphic LCD display. The menu options for this sample are as follows.
1. Set Date/Time 2. Display Date/Time 3. Turn Backlight OFF 4. Turn Backlight ON 5. Toggle LEDs 6. Increment LEDs 7. Disable LEDs
* LED.C--Demonstrates how to toggle the LEDs on the LCD/keypad module. * SCROLLING.C--Demonstrates scrolling features of the GRAPHIC.LIB library. * TEXT.C--Demonstrates the text functions in the GRAPHIC.LIB library. Here is a list of what is demonstrated.
1. Font initialization. 2. Text window initialization. 3. Text window, end-of-line wraparound, end-of-text window clipping, line feed, and carriage return. 4. Creating 2 different TEXT windows for display. 5. Displaying different FONT sizes.
User's Manual
141
APPENDICES
The following sample programs, found in the SAMPLES\LCD_Keypad\122x32_1x7\ TCPIP folder, are targeted at the Ethernet-enabled versions of the Smart Star and the BL2110. Remember to configure the IP address, netmask, and gateway as indicated in the sample programs. * MBOXDEMO.C--This program implements a web server that allows e-mail messages to be entered that are then shown on the LCD display. The keypad allows you to scroll within messages, flip to other e-mails, mark messages as read, and delete e-mails. When a new e-mail arrives, an LED turns on, and turns off once the message has been marked as read. A log of all e-mail actions is kept, and can be displayed in the Web browser. All current e-mails can also be read with the Web browser. When using MBOXDEMO.C, connect the Smart Star and a PC (or other device with a Web Browser) to an Ethernet. If you connect the PC and the Smart Star directly, be sure to use a crossover Ethernet cable; strait-through Ethernet cables and a hub may be used instead. * TCP_RESPOND.C--This program and TCP_SEND.C are executed on two separate single-board computers to demonstrate how the two boards communicate with each other. Use PCSEND.EXE on the PC console side at the command prompt if you do not have a second board. PCSEND.EXE is located with source code in the SAMPLES\ LCD_Keypad\Windows directory.
TCP_RESPOND.C waits for a message from another single-board computer. The mes-
sage received is displayed on the LCD, and you may respond by pressing a key on the keypad. The response is then sent to the remote single-board computer. * TCPSEND.C--This program and TCP_RESPOND.C are executed on two separate singleboard computers to demonstrate how the two boards communicate with each other. Use PCRESPOND.EXE on the PC console side at the command prompt if you do not have a second board. PCRESPOND.EXE is located with source code in the SAMPLESLCD_Keypad\Windows directory. When a key on the keypad is pressed, a message associated with that key is sent to a specified destination address and port. The destination then responds to that message. The response is displayed on the LCD. Note that only the LEFT and UP scroll keys are set up to cause a message to be sent. When using TCPSEND.C and TCP_RESPOND.C, connect the Smart Star and the other single-board computer to an Ethernet. If you connect the them directly, be sure to use a crossover Ethernet cable; straight-through Ethernet cables and a hub may be used instead.
APPENDICES
142
Smart Star (SR9000)
B.8 LCD/Keypad Module Function Calls
B.8.1 LEDs When power is applied to the LCD/keypad module for the first time, the red LED (DS1) will come on, indicating that power is being applied to the LCD/keypad module. The red LED is turned off when the brdInit function executes. One function is available to control the LEDs, and can be found in the LIB\SMRTSTAR\ SMRTSTAR.LIB library.
void ledOut(int led, int value);
LED on/off control. This function will only work when the LCD/keypad module is installed on the Smart Star.
PARAMETERS
led is the LED to control. 0 = LED DS1 1 = LED DS2 2 = LED DS3 3 = LED DS4 4 = LED DS5 5 = LED DS6 6 = LED DS7 value is the value used to control whether the LED is on or off (0 or 1). 0 = off 1 = on
RETURN VALUE
None.
SEE ALSO brdInit
User's Manual
143
APPENDICES
B.8.2 LCD Display The functions used to control the LCD display are contained in the Dynamic C LIB\DISPLAYS\GRAPHIC\GRAPHIC.LIB library. When x and y coordinates on the display screen are specified, x can range from 0 to 121, and y can range from 0 to 31. These numbers represent pixels from the top left corner of the display.
void glInit(void);
Initializes the display devices, clears the screen.
RETURN VALUE
None.
SEE ALSO glDispOnOFF, glBacklight, glSetContrast, glPlotDot, glBlock, glPlotDot, glPlotPolygon, glPlotCircle, glHScroll, glVScroll, glXFontInit, glPrintf, glPutChar, glSetBrushType, glBuffLock, glBuffUnlock, glPlotLine
void glBackLight(int onOff);
Turns the display backlight on or off.
PARAMETER
onOff turns the backlight on or off 1--turn the backlight on 0--turn the backlight off
RETURN VALUE
None.
SEE ALSO glInit, glDispOnoff, glSetContrast
void glDispOnOff(int onOff);
Sets the LCD screen on or off. Data will not be cleared from the screen.
PARAMETER
onOff turns the LCD screen on or off 1--turn the LCD screen on 0--turn the LCD screen off
RETURN VALUE
None.
SEE ALSO glInit, glSetContrast, glBackLight
APPENDICES
144
Smart Star (SR9000)
void glSetContrast(unsigned level);
Sets display contrast.
NOTE: This function is not used with the LCD/keypad module since the support circuits are not available on the LCD/keypad module.
void glFillScreen(char pattern);
Fills the LCD display screen with a pattern.
PARAMETER
The screen will be set to all black if pattern is 0xFF, all white if pattern is 0x00, and vertical stripes for any other pattern.
RETURN VALUE
None.
SEE ALSO glBlock, glBlankScreen, glPlotPolygon, glPlotCircle
void glBlankScreen(void);
Blanks the LCD display screen (sets LCD display screen to white).
RETURN VALUE
None.
SEE ALSO glFillScreen, glBlock, glPlotPolygon, glPlotCircle
void glBlock(int x, int y, int bmWidth, int bmHeight);
Draws a rectangular block in the page buffer and on the LCD if the buffer is unlocked. Any portion of the block that is outside the LCD display area will be clipped.
PARAMETERS
x is the x coordinate of the top left corner of the block. y is the y coordinate of the top left corner of the block. bmWidth is the width of the block. bmWidth is the height of the block.
RETURN VALUE
None.
SEE ALSO glFillScreen, glBlankScreen, glPlotPolygon, glPlotCircle
User's Manual
145
APPENDICES
void glPlotVPolygon(int n, int *pFirstCoord);
Plots the outline of a polygon in the LCD page buffer, and on the LCD if the buffer is unlocked. Any portion of the polygon that is outside the LCD display area will be clipped. If fewer than 3 vertices are specified, the function will return without doing anything.
PARAMETERS
n is the number of vertices. *pFirstCoord is a pointer to array of vertex coordinates: x1,y1, x2,y2, x3,y3,...
RETURN VALUE
None.
SEE ALSO glPlotPolygon, glFillPolygon, glFillVPolygon
void glPlotPolygon(int n, int y1, int x2, int y2, ...);
Plots the outline of a polygon in the LCD page buffer and on the LCD if the buffer is unlocked. Any portion of the polygon that is outside the LCD display area will be clipped. If fewer than 3 vertices are specified, the function will return without doing anything.
PARAMETERS
n is the number of vertices. y1 is the y coordinate of the first vertex. x1 is the x coordinate of the first vertex. y2 is the y coordinate of the second vertex. x2 is the x coordinate of the second vertex. ... are the coordinates of additional vertices.
RETURN VALUE
None.
SEE ALSO glPlotVPolygon, glFillPolygon, glFillVPolygon
APPENDICES
146
Smart Star (SR9000)
void glFillVPolygon(int n, int *pFirstCoord);
Fills a polygon in the LCD page buffer and on the LCD screen if the buffer is unlocked. Any portion of the polygon that is outside the LCD display area will be clipped. If fewer than 3 vertices are specified, the function will return without doing anything.
PARAMETERS
n is the number of vertices. *pFirstCoord is a pointer to array of vertex coordinates: x1,y1, x2,y2, x3,y3,...
RETURN VALUE
None.
SEE ALSO glFillPolygon, glPlotPolygon, glPlotVPolygon
void glFillPolygon(int n, int x1, int y1, int x2, int y2, ...);
Fills a polygon in the LCD page buffer and on the LCD if the buffer is unlocked. Any portion of the polygon that is outside the LCD display area will be clipped. If fewer than 3 vertices are specified, the function will return without doing anything.
PARAMETERS
n is the number of vertices. x1 is the x coordinate of the first vertex. y1 is the y coordinate of the first vertex. x2 is the x coordinate of the second vertex. y2 is the y coordinate of the second vertex. ... are the coordinates of additional vertices.
RETURN VALUE
None.
SEE ALSO glFillVPolygon, glPlotPolygon, glPlotVPolygon
User's Manual
147
APPENDICES
void glPlotCircle(int xc, int yc, int rad);
Draws the outline of a circle in the LCD page buffer and on the LCD if the buffer is unlocked. Any portion of the circle that is outside the LCD display area will be clipped.
PARAMETERS
xc is the x coordinate of the center of the circle. yc is the y coordinate of the center of the circle. rad is the radius of the center of the circle (in pixels).
RETURN VALUE
None.
SEE ALSO glFillCircle, glPlotPolygon, glFillPolygon
void glFillCircle(int xc, int yc, int rad);
Draws a filled circle in the LCD page buffer and on the LCD if the buffer is unlocked. Any portion of the circle that is outside the LCD display area will be clipped.
PARAMETERS
xc is the x coordinate of the center of the circle. yc is the y coordinate of the center of the circle. rad is the radius of the center of the circle (in pixels).
RETURN VALUE
None.
SEE ALSO glPlotCircle, glPlotPolygon, glFillPolygon
APPENDICES
148
Smart Star (SR9000)
void glXFontInit(fontInfo *pInfo, char pixWidth, char pixHeight, unsigned startChar, unsigned endChar, unsigned long xmemBuffer);
Initializes the font descriptor structure, where the font is stored in xmem.
PARAMETERS
*pInfo is a pointer to the font descriptor to be initialized. pixWidth is the width (in pixels) of each font item. pixHeight is the height (in pixels) of each font item. startChar is the value of the first printable character in the font character set. endChar is the value of the last printable character in the font character set. xmemBuffer is the xmem pointer to a linear array of font bitmaps.
RETURN VALUE
None.
SEE ALSO glPrinf
unsigned long glFontCharAddr(fontInfo *pInfo, char letter);
Returns the xmem address of the character from the specified font set.
PARAMETERS
*pInfo is the xmem address of the bitmap font set. letter is an ASCII character.
RETURN VALUE
xmem address of bitmap character font, column major, and byte-aligned.
SEE ALSO glPutFont, glPrintf
User's Manual
149
APPENDICES
void glPutFont(int x, int y, fontInfo *pInfo, char code);
Puts an entry from the font table to the page buffer and on the LCD if the buffer is unlocked. Each font character's bitmap is column major and byte-aligned. Any portion of the bitmap character that is outside the LCD display area will be clipped.
PARAMETERS
x is the x coordinate (column) of the top left corner of the text. y is the y coordinate (row) of the top left corner of the text. *pInfo is a pointer to the font descriptor. code is the ASCII character to display.
RETURN VALUE
None.
SEE ALSO glFontCharAddr, glPrintf
void glSetPfStep(int stepX, int stepY);
Sets the glPrintf() printing step direction. The x and y step directions are independent signed values. The actual step increments depend on the height and width of the font being displayed, which are multiplied by the step values.
PARAMETERS
stepX is the glPrintf x step value stepY is the glPrintf y step value
RETURN VALUE
None.
SEE ALSO
Use glGetPfStep() to examine the current x and y printing step direction.
int glGetPfStep(void);
Gets the current glPrintf() printing step direction. Each step direction is independent of the other, and is treated as an 8-bit signed value. The actual step increments depends on the height and width of the font being displayed, which are multiplied by the step values.
RETURN VALUE
The x step is returned in the MSB, and the y step is returned in the LSB of the integer result.
SEE ALSO
Use glGetPfStep() to control the x and y printing step direction.
APPENDICES
150
Smart Star (SR9000)
void glPutChar(char ch, char *ptr, int *cnt, glPutCharInst *pInst)
Provides an interface between the STDIO string-handling functions and the graphic library. The STDIO string-formatting function will call this function, one character at a time, until the entire formatted string has been parsed. Any portion of the bitmap character that is outside the LCD display area will be clipped.
PARAMETERS
ch is the character to be displayed on the LCD. *ptr is not used, but is a place holder for STDIO string functions. *cnt is not used, is a place holder for STDIO string functions. *pInst is a font descriptor pointer.
RETURN VALUE
None.
SEE ALSO glPrintf, glPutFont, doprnt
void glPrintf(int x, int y, fontInfo *pInfo, char *fmt, ...);
Prints a formatted string (much like printf) on the LCD screen. Only the character codes that exist in the font set are printed, all others are skipped. For example, '\b', '\t', '\n' and '\r' (ASCII backspace, tab, new line, and carriage return, respectively) will be printed if they exist in the font set, but will not have any effect as control characters. Any portion of the bitmap character that is outside the LCD display area will be clipped.
PARAMETERS
x is the x coordinate (column) of the top left corner of the text. y is the y coordinate (row) of the top left corner of the text. *pInfo is a font descriptor pointer. *fmt is a formatted string. ... are formatted string conversion parameter(s).
EXAMPLE glprintf(0,0, &fi12x16, "Test %d\n", count); RETURN VALUE
None.
SEE ALSO glXFontInit
User's Manual
151
APPENDICES
void glBuffLock(void);
Increments LCD screen locking counter. Graphic calls are recorded in the LCD memory buffer and are not transferred to the LCD if the counter is non-zero.
NOTE: glBuffLock() and glBuffUnlock() can be nested up to a level of 255, but be sure to balance the calls. It is not a requirement to use these procedures, but a set of glBuffLock() and glBuffUnlock() bracketing a set of related graphic calls speeds up the rendering significantly.
RETURN VALUE
None.
SEE ALSO glBuffUnlock, glSwap
void glBuffUnlock(void);
Decrements the LCD screen locking counter. The contents of the LCD buffer are transferred to the LCD if the counter goes to zero.
RETURN VALUE
None.
SEE ALSO glBuffLock, glSwap
void glSwap(void);
Checks the LCD screen locking counter. The contents of the LCD buffer are transferred to the LCD if the counter is zero.
RETURN VALUE
None.
SEE ALSO glBuffUnlock, glBuffLock, _glSwapData (located in the library specifically for the LCD
that you are using)
void glSetBrushType(int type);
Sets the drawing method (or color) of pixels drawn by subsequent graphic calls.
PARAMETER
type value can be one of the following macros. PIXBLACK draws black pixels (turns pixel on). PIXWHITE draws white pixels (turns pixel off). PIXXOR draws old pixel XOR'ed with the new pixel.
RETURN VALUE
None.
APPENDICES
SEE ALSO glGetBrushType 152 Smart Star (SR9000)
int glGetBrushType(void);
Gets the current method (or color) of pixels drawn by subsequent graphic calls.
RETURN VALUE
The current brush type.
SEE ALSO glSetBrushType
void glPlotDot(int x, int y);
Draws a single pixel in the LCD buffer, and on the LCD if the buffer is unlocked. If the coordinates are outside the LCD display area, the dot will not be plotted.
PARAMETERS
x is the x coordinate of the dot. y is the y coordinate of the dot.
RETURN VALUE
None.
SEE ALSO glPlotline, glPlotPolygon, glPlotCircle
void glPlotLine(int x0, int y0, int x1, int y1);
Draws a line in the LCD buffer, and on the LCD if the buffer is unlocked. Any portion of the line that is beyond the LCD display area will be clipped.
PARAMETERS
x0 is the x coordinate of one endpoint of the line. y0 is the y coordinate of one endpoint of the line. x1 is the x coordinate of the other endpoint of the line. y1 is the y coordinate of the other endpoint of the line.
RETURN VALUE
None.
SEE ALSO glPlotDot, glPlotPolygon, glPlotCircle
User's Manual
153
APPENDICES
void glLeft1(int left, int top, int cols, int rows);
Scrolls byte-aligned window left one pixel, right column is filled by current pixel type (color).
PARAMETERS
left is the top left corner of bitmap, must be evenly divisible by 8, otherwise truncates. top is the top left corner of the bitmap. cols is the number of columns in the window, must be evenly divisible by 8, otherwise truncates. rows is the number of rows in the window.
RETURN VALUE
None.
SEE ALSO glHScroll, glRight1
void glRight1(int left, int top, int cols, int rows);
Scrolls byte-aligned window right one pixel, left column is filled by current pixel type (color).
PARAMETERS
left is the top left corner of bitmap, must be evenly divisible by 8, otherwise truncates. top is the top left corner of the bitmap. cols is the number of columns in the window, must be evenly divisible by 8, otherwise truncates. rows is the number of rows in the window.
RETURN VALUE
None.
SEE ALSO glHScroll, glLeft1
void glUp1(int left, int top, int cols, int rows);
Scrolls byte-aligned window up one pixel, bottom column is filled by current pixel type (color).
PARAMETERS
left is the top left corner of bitmap, must be evenly divisible by 8, otherwise truncates. top is the top left corner of the bitmap. cols is the number of columns in the window, must be evenly divisible by 8, otherwise truncates. rows is the number of rows in the window.
RETURN VALUE
None.
SEE ALSO glVScroll, glDown1
APPENDICES
154
Smart Star (SR9000)
void glDown1(int left, int top, int cols, int rows);
Scrolls byte-aligned window down one pixel, top column is filled by current pixel type (color).
PARAMETERS
left is the top left corner of bitmap, must be evenly divisible by 8, otherwise truncates. top is the top left corner of the bitmap. cols is the number of columns in the window, must be evenly divisible by 8, otherwise truncates. rows is the number of rows in the window.
RETURN VALUE
None.
SEE ALSO glVScroll, glUp1
void glHScroll(int left, int top, int cols, int rows, int nPix);
Scrolls right or left, within the defined window by x number of pixels. The opposite edge of the scrolled window will be filled in with white pixels. The window must be byte-aligned. Parameters will be verified for the following: 1. The left and cols parameters will be verified that they are evenly divisible by 8. If not, they will be truncated to a value that is a multiple of 8. 2. Parameters will be checked to verify that the scrolling area is valid. The minimum scrolling area is a width of 8 pixels and a height of one row.
PARAMETERS
left is the top left corner of bitmap, must be evenly divisible by 8. top is the top left corner of the bitmap. cols is the number of columns in the window, must be evenly divisible by 8. rows is the number of rows in the window. nPix is the number of pixels to scroll within the defined window (a negative value will produce a scroll to the left).
RETURN VALUE
None.
SEE ALSO glVScroll
User's Manual
155
APPENDICES
void glVScroll(int left, int top, int cols, int rows, int nPix);
Scrolls up or down, within the defined window by x number of pixels. The opposite edge of the scrolled window will be filled in with white pixels. The window must be byte-aligned. Parameters will be verified for the following: 1. The left and cols parameters will be verified that they are evenly divisible by 8. If not, they will be truncated to a value that is a multiple of 8. 2. Parameters will be checked to verify that the scrolling area is valid. The minimum scrolling area is a width of 8 pixels and a height of one row.
PARAMETERS
left is the top left corner of bitmap, must be evenly divisible by 8. top is the top left corner of the bitmap. cols is the number of columns in the window, must be evenly divisible by 8. rows is the number of rows in the window. nPix is the number of pixels to scroll within the defined window (a negative value will produce a scroll up).
RETURN VALUE
None.
SEE ALSO glHScroll
void glXPutBitmap(int left, int top, int width, int height, unsigned long bitmap);
Draws bitmap in the specified space. The data for the bitmap are stored in xmem. This function calls glXPutFastmap automatically if the bitmap is byte-aligned (the left edge and the width are each evenly divisible by 8). Any portion of a bitmap image or character that is outside the LCD display area will be clipped.
PARAMETERS
left is the top left corner of the bitmap. top is the top left corner of the bitmap. width is the width of the bitmap. height is the height of the bitmap. bitmap is the address of the bitmap in xmem.
RETURN VALUE
None.
SEE ALSO glXPutFastmap, glPrintf
APPENDICES
156
Smart Star (SR9000)
void glXPutFastmap(int left, int top, int width, int height, unsigned long bitmap);
Draws bitmap in the specified space. The data for the bitmap are stored in xmem. This function is like glXPutBitmap, except that it is faster. The restriction is that the bitmap must be byte-aligned. Any portion of a bitmap image or character that is outside the LCD display area will be clipped.
PARAMETERS
left is the top left corner of the bitmap, must be evenly divisible by 8, otherwise truncates. top is the top left corner of the bitmap. width is the width of the bitmap, must be evenly divisible by 8, otherwise truncates. height is the height of the bitmap. bitmap is the address of the bitmap in xmem.
RETURN VALUE
None.
SEE ALSO glXPutBitmap, glPrintf
int TextWindowFrame(windowFrame *window, fontInfo *pFont, int x, int y, int winWidth, int winHeight)
Defines a text-only display window. This function provides a way to display characters within the text window using only character row and column coordinates. The text window feature provides end-of-line wrapping and clipping after the character in the last column and row is displayed.
NOTE: Execute the TextWindowFrame function before other Text... functions.
PARAMETERS
*window is a window frame descriptor pointer. *pFont is a font descriptor pointer. x is the x coordinate of the top left corner of the text window frame. y is the y coordinate of the top left corner of the text window frame. winWidth is the width of the text window frame. winHeight is the height of the text window frame.
RETURN VALUE
0--window frame was successfully created. -1--x coordinate + width has exceeded the display boundary. -2--y coordinate + height has exceeded the display boundary.
User's Manual
157
APPENDICES
void TextGotoXY(windowFrame *window, int col, int row);
Sets the cursor location to display the next character. The display location is based on the height and width of the character to be displayed.
NOTE: Execute the TextWindowFrame function before using this function.
PARAMETERS
*window is a pointer to a font descriptor. col is a character column location. row is a character row location.
RETURN VALUE
None.
SEE ALSO TextPutChar, TextPrintf, TextWindowFrame
void TextCursorLocation(windowFrame *window, int *col, int *row);
Gets the current cursor location that was set by a Graphic Text... function.
NOTE: Execute the TextWindowFrame function before using this function.
PARAMETERS
*window is a pointer to a font descriptor. *col is a pointer to cursor column variable. *row is a pointer to cursor row variable.
RETURN VALUE
Lower word = Cursor Row location Upper word = Cursor Column location
SEE ALSO TextGotoXY, TextPrintf, TextWindowFrame, TextCursorLocation
APPENDICES
158
Smart Star (SR9000)
void TextPutChar(struct windowFrame *window, char ch);
Displays a character on the display where the cursor is currently pointing. If any portion of a bitmap character is outside the LCD display area, the character will not be displayed. The cursor increments its position as needed.
NOTE: Execute the TextWindowFrame function before using this function.
PARAMETERS
*window is a pointer to a font descriptor. ch is a character to be displayed on the LCD.
RETURN VALUE
None.
SEE ALSO TextGotoXY, TextPrintf, TextWindowFrame, TextCursorLocation
void TextPrintf(struct windowFrame *window, char *fmt, ...);
Prints a formatted string (much like printf) on the LCD screen. Only printable characters in the font set are printed, also escape sequences, '\r' and '\n' are recognized. All other escape sequences will be skipped over; for example, '\b' and 't' will print if they exist in the font set, but will not have any effect as control characters. The text window feature provides end-of-line wrapping and clipping after the character in the last column and row is displayed. The cursor then remains at the end of the string.
NOTE: Execute the TextWindowFrame function before using this function.
PARAMETERS
*window is a pointer to a font descriptor. *fmt is a formatted string. ... are formatted string conversion parameter(s).
EXAMPLE TextPrintf(&TextWindow, "Test %d\n", count); RETURN VALUE
None.
SEE ALSO TextGotoXY, TextPutChar, TextWindowFrame, TextCursorLocation
User's Manual
159
APPENDICES
B.8.3 Keypad The functions used to control the keypad are contained in the Dynamic C LIB\
KEYPADS\KEYPAD7.LIB library.
void keyInit(void);
Initializes keypad process
RETURN VALUE
None.
SEE ALSO brdInit
void keyConfig(char cRaw, char cPress, char cRelease, char cCntHold, char cSpdLo, char cCntLo, char cSpdHi);
Assigns each key with key press and release codes, and hold and repeat ticks for auto repeat and debouncing.
PARAMETERS
cRaw is a raw key code index. 1x7 keypad matrix with raw key code index assignments (in brackets): [0] [4] User Keypad Interface cPress is a key press code An 8-bit value is returned when a key is pressed. 0 = Unused. See keypadDef() for default press codes. cRelease is a key release code. An 8-bit value is returned when a key is pressed. 0 = Unused. cCntHold is a hold tick, which is approximately one debounce period or 5 s. How long to hold before repeating. 0 = No Repeat. cSpdLo is a low-speed repeat tick, which is approximately one debounce period or 5 s. How many times to repeat. 0 = None. cCntLo is a low-speed hold tick, which is approximately one debounce period or 5 s. [1] [5] [2] [6] [3]
APPENDICES
How long to hold before going to high-speed repeat. 0 = Slow Only.
160 Smart Star (SR9000)
cSpdHi is a high-speed repeat tick, which is approximately one debounce period or 5 s. How many times to repeat after low-speed repeat. 0 = None.
RETURN VALUE
None.
SEE ALSO keyProcess, keyGet, keypadDef
void keyProcess(void);
Scans and processes keypad data for key assignment, debouncing, press and release, and repeat.
NOTE: This function is also able to process an 8 x 8 matrix keypad.
RETURN VALUE
None
SEE ALSO keyConfig, keyGet, keypadDef
char keyGet(void);
Get next keypress
RETURN VALUE
The next keypress, or 0 if none
SEE ALSO keyConfig, keyProcess, keypadDef
int keyUnget(char cKey);
Pushes the value of cKey to the top of the input queue, which is 16 bytes deep.
PARAMETER
cKey
RETURN VALUE
None.
SEE ALSO keyGet
User's Manual
161
APPENDICES
void keypadDef();
Configures the physical layout of the keypad with the default ASCII return key codes. Keypad physical mapping 1 x 7 0 ['L'] ['-'] 4 1 ['U'] ['+'] 5 2 ['D'] ['E'] 6 3 ['R']
where 'D' represents Down Scroll 'U' represents Up Scroll 'R' represents Right Scroll 'L' represents Left Scroll '-' represents Page Down '+' represents Page Up 'E' represents the ENTER key Example: Do the followingfor the above physical vs. ASCII return key codes.
keyConfig keyConfig keyConfig keyConfig keyConfig keyConfig keyConfig ( ( ( ( ( ( ( 3,'R',0, 6,'E',0, 2,'D',0, 4,'-',0, 1,'U',0, 5,'+',0, 0,'L',0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 0 0 0 0 0 0 ); ); ); ); ); ); );
Characters are returned upon keypress with no repeat.
RETURN VALUE
None.
SEE ALSO keyConfig, keyGet, keyProcess
void keyScan(char *pcKeys);
Writes "1" to each row and reads the value. The position of a keypress is indicated by a zero value in a bit position.
PARAMETER
*pcKeys is a pointer to the address of the value read.
RETURN VALUE
None.
SEE ALSO keyConfig, keyGet, keypadDef, keyProcess
APPENDICES
162
Smart Star (SR9000)
B.9 Font and Bitmap Converter
A Font and Bitmap Converter tool is available to convert Windows fonts and monochrome bitmaps to a library file format compatible with Rabbit's Dynamic C applications and graphical displays. Non-Roman characters can also be converted by applying the monochrome bitmap converter to their bitmaps. Start the Font and Bitmap Converter tool by double-clicking on the fbmcnvtr.exe file in the Dynamic C directory. You then select and convert existing fonts or bitmaps. Complete instructions are available via the Help menu that is in the Font and Bitmap Converter tool. Once you are done, the converted file is displayed in the editing window. Editing may be done, but should not be necessary. Save the file as libraryfilename.lib, where libraryfilename is a file name of your choice. Add the library file(s) to applications with the statement #use libraryfilename.lib, or by cutting and pasting from the library file(s) you created into the application program.
TIP: If you used the #use libraryfilename.lib statement, remember to enter libraryfilename.lib into lib.dir, which is located in your Dynamic C directory.
You are now ready to add the font or bitmap to your application using the glXFontInit or the glXPutBitmap function calls.
User's Manual
163
APPENDICES
APPENDICES
164
Smart Star (SR9000)
APPENDIX C. POWER MANAGEMENT
Appendix C provides information on the current requirements of the Smart Star I/O cards, the use and installation of a backup battery, and some background on power management.
User's Manual
165
APPENDICES
C.1 Current Requirements
Remember to take the current draw of the various I/O cards into consideration when selecting the power supply for your Smart Star control system. Table C-1 lists the typical current consumption for the CPU Card and the I/O cards.
Table C-1. Current Consumption of I/O Cards Attached to Smart Star Backplane
Current Consumption I/O Cards +5 V Supply Digital I/O (SR9200 series) A/D Converter (SR9300 series) D/A Converter (SR9400 series) Relay (SR9500 series) CPU Card 65 mA +V_USER Supply up to 200 mA/output*
40 mA
35 mA
10 mA 190 mA
75 mA --
* Maximum current 2.0 A per I/O card, 7.0 A for Smart Star system
C.2 Batteries and External Battery Connections
An onboard 265 mA*h lithium coin cell on the CPU Card provides power to the real-time clock and SRAM when external power is removed from the Smart Star control system. This allows the CPU Card to continue to keep track of time and preserves the SRAM memory contents while the power is off. The drain on the battery is typically less than 20 A when there is no external power applied. The battery can last
265 mA*h ----------------------- = 3.0 years. 10 A
The drain on the battery is typically less than 4 A when external power is applied. The battery can last for
265 mA*h ----------------------- = 7.5 years. 4 A
Since the shelf life of the battery is 10 years, the battery can last for most of its shelf life when external power is applied most of the time.
APPENDICES
166
Smart Star (SR9000)
C.2.1 Replacing the Backup Battery The battery is user-replaceable, and is fitted in a battery holder. To replace the battery, lift up on the spring clip and slide out the old battery. Use only a Panasonic CR2330 or equivalent replacement battery, and insert it into the battery holder with the + side facing up.
NOTE: The SRAM contents and the real-time clock settings will be lost if the battery is replaced with no power applied to the Smart Star. There is a provision for an external battery if you need to save the SRAM contents and the real-time clock settings since the CPU Card needs to be removed from the backplane in order to change the onboard battery. CAUTION: There is an explosion danger if the battery is short-circuited, recharged, or replaced incorrectly. Replace the battery only with the same type or an equivalent type recommended by the battery manufacturer. Dispose of used batteries according to the battery manufacturer's instructions.
C.2.2 Battery-Backup Circuit Figure C-1 shows the battery-backup circuit.
Internal Battery BT1
VBAT-INT
D3
R41 1 kW
R39 1 kW T RT1
thermistor
VRAM
External Battery J8
1 2 3 VBAT-EXT
D5
22 kW R42 1 kW Vcc D1 VBAT C12 10 nF D2 R1 22 kW R3 10 kW R6 22 kW R8 47 kW C6 10 nF VOSC
Figure C-1. Smart Star CPU Card Backup Battery Circuit
The battery-backup circuit serves three purposes: * It reduces the battery voltage to the SRAM and to the real-time clock, thereby limiting the current consumed by the real-time clock and lengthening the battery life. * It ensures that current can flow only out of the battery to prevent charging the battery. * A voltage, VOSC, is supplied to U14, which keeps the 32.768 kHz oscillator working when the voltage begins to drop. VRAM and Vcc are nearly equal (<100 mV, typically 10 mV) when power is supplied to the CPU Card.
User's Manual 167
APPENDICES
C.2.3 Power to VRAM Switch The VRAM switch, shown in Figure C-2, allows the battery backup to provide power when the external power goes off. The switch provides an isolation between +5 V and the battery when +5 V goes low. This prevents the +5 V line from draining the battery.
+5 V R38
0W
VRAM
(not installed)
Q6 FDV302P
R37
10 kW
/RES
R36
22 kW
Q7 MMBT3904
Figure C-2. VRAM Switch
Transistor Q6 is needed to provide a very small voltage drop between +5 V and VRAM (<100 mV, typically 10 mV) so that the processor lines powered by +5 V will not have a significantly different voltage than VRAM. When the CPU Card is not resetting (pin 2 on U4 is high), the /RES line will be high. This turns on Q6, causing its collector to go low. This turns on Q7, allowing VRAM to nearly equal +5 V. When the CPU Card is resetting, the /RES line will go low. This turns off Q6 and Q7, providing an isolation between +5 V and VRAM. The battery-backup circuit keeps VRAM from dropping below 2 V.
APPENDICES
168
Smart Star (SR9000)
C.2.4 Reset Generator The CPU Card uses a reset generator, U4, to reset the Rabbit 2000 microprocessor when the voltage drops below the voltage necessary for reliable operation. The reset occurs between 4.50 V and 4.75 V, typically 4.63 V. The reset can be initiated either externally or by a watchdog timeout (WDTOUT) on the Rabbit 2000 microprocessor.
+5 V
U4
C9 10 nF RESET WDTOUT R10 100 kW
RESET GENERATOR
R16 10 kW
U2:B
EXT RESET
Figure C-3. Reset Generator
NOTE: The Dynamic C function chkWDTO is not able to detect whether a watchdog timeout has occurred on the SR9100 series of CPU cards. The GCSR status bits are read and stored by the BIOS, and the reset status bit would normally change once a reset has occurred. However, since WDTOUT is tied to the reset generator, a watchdog timeout forces a hardware reset, followed by the BIOS reading and storing the status bits corresponding to power-up or reset.
User's Manual
169
APPENDICES
C.2.5 External Battery A connection for an external backup battery is provided at header J8, shown in Figure C-4. The header is wired to provide reverse polarity protection.
CPU Card
J3 C19 C23
C24
C25 U10 C27 C28 C26 J7 J6
Y1 R5 C4 C7 R2
R11
R17 C18
C11 R12
C1 C2
RT1
R4 C3 R1 R3 U3 R14 D1 D2 Y2 C8 C10 C13
R13
Figure C-4. External Backup Battery Connection
The external battery connection is useful if the SRAM and real-time clock data need to be preserved while the backup battery is being changed. This way power can continue to be applied to the CPU Card from the backplane (if the external backup battery is being replaced) or from the external battery (if the onboard backup battery needs to be changed since this requires removing the CPU Card from the backplane in order to access the onboard backup battery).
APPENDICES
170
JP1 U6
J4
R20 C17 J4 C22 U8 RP4 C30
C35
C46
C49
3
J8
C53 U14 R33
2 1
+
GND
C12
C15
R32
U1
C21 U9 Y3
C31
C36
C41 D3
J8
C16 J5
C32
R34
J5
R23 R26 Q1 Q3
D5 C40
C33
R41 R39
R42
R21 BT1
Battery
Smart Star (SR9000)
C.3 Chip Select Circuit
Figure C-5 shows a schematic of the chip select circuit for the RAM.
VRAM R31
/CSRAM /CS1
Q5
Q4
VRAM R37 10 kW
/RES
Figure C-5. Chip Select Circuit
The current drain on the battery in a battery-backed circuit must be kept to a minimum. When the CPU Card is not powered, the battery keeps the SRAM memory contents and the real-time clock (RTC) going. The SRAM has a powerdown mode that greatly reduces power consumption. This powerdown mode is activated by raising the chip select (CS) signal line. Normally the SRAM requires +5 V to operate. However, only 2 V is required for data retention in powerdown mode. Thus, when power is removed from the circuit, the battery voltage needs to be provided to both the SRAM power pin and to the CS signal line. The CS control circuit accomplishes this task for the CS signal line. In a powered-up condition, the CS control circuit must allow the processor's chip select signal /CS1 to control the SRAM's CS signal /CSRAM. So, with power applied, /CSRAM must be the same signal as /CS1, and with power removed, /CSRAM must be held high (but only needs to be battery voltage high). Q4 and Q5 are MOSFET transistors with opposing polarity. They are both turned on when power is applied to the circuit. They allow the CS signal to pass from the processor to the SRAM so that the processor can periodically access the SRAM. When power is removed from the circuit, the transistors will turn off and isolate /CSRAM from the processor. The isolated /CSRAM line has a 100 k pullup resistor to VRAM (R31). This pullup resistor keeps /CSRAM at the VRAM voltage level (which under no power condition is the backup battery's regulated voltage at a little more than 2 V). Transistors Q4 and Q5 are of opposite polarity so that a rail-to-rail voltage can be passed. When the /CS1 voltage is low, Q5 will conduct. When the /CS1 voltage is high, Q4 will conduct. It takes time for the transistors to turn on, creating a propagation delay. This delay is typically very small, about 10 ns to 15 ns. APPENDICES The signal that turns the transistors on is a high on the processor's reset line, /RES. When the CPU Card is not in reset, the reset line will be high, turning on n-channel Q5. When a reset occurs, the /RES line will go low.
User's Manual 171
APPENDICES
172
Smart Star (SR9000)
APPENDIX D. SMART STAR SLOT ADDRESS LAYOUT
Appendix D provides information about the register addresses for the various I/O card slots on the backplane. The information in this appendix will be of interest to more advanced users.
User's Manual
173
APPENDICES
The slots on the Smart Star backplane are accessed as external registers via the Rabbit 2000's assembly IOE prefix or via standard Rabbit BIOS functions. More convenient functions specific to the Smart Star control system have been written to provide more flexibility; for example, there is now a provision for the automatic update of shadow registers for each slot and for each register. The Smart Star design routes four address bits to each slot, providing 16 register addresses for each slot. These bits are passed through as bits 0-3 of the register address. The slot number itself is assigned to bits 6-8 of the address. In addition, the backplane design requires that bits 13 and 14 be high and that bit 9 be low. The simplest way to enforce this is to use a base address of 0x6000. Table D-1 provides the address layout for accessing the Smart Star slots, where Sn is the binary representation of the slot number (0-6), Rn is the binary representation of the register numbers (0-15), and X means the value does not matter.
Table D-1. Smart Star External Register Address Bitmap
A15 A14 A13 A12 A11 A10 0 1 1 0 X X A9 0 A8 S2 A7 S1 A6 S0 A5 X A4 X A3 R3 A2 R2 A1 R1 A0 R0
This bit mapping of the external register address provides the register addresses for each slot as listed in Table D-2.
Table D-2. Slot External Register Addresses
Slot Number 0 1 2 3 4 5 6 Address Range 0x6000-0x600F 0x6040-0x604F 0x6080-0x608F 0x60C0-0x60CF 0x6100-0x610F 0x6140-0x614F 0x6180-0x618F
APPENDICES
174
Smart Star (SR9000)
D.1 Digital I/O Card Channel Layout
The Digital I/O Card layout is complicated by the standard Rabbit method of minimizing chip layout while adding channel arrangement flexibility. In particular, the nibble-wise layout of digital input channels requires fewer chips if fewer channels are desired. This is a common feature on Rabbit products and should not surprise most users. The digital output channel layout is straightforward. It is also possible to access the digital I/O channels in banks of eight channels. This method is significantly faster than reading eight channels one at a time, and so was included in the function call.
Table D-3. Digital I/O Card Bank/Channel Mapping
Local Board Address 0x00 0x01 0x02 0x03 Input Bank 0 2 1 2 Output Bank Input Channels 0-3/8-11 4-7/12-15 0-7 8-15 Output Channels
User's Manual
175
APPENDICES
D.2 A/D Converter Card Channel Layout
The A/D Converter Card contains a single 11-input 12-bit A/D converter, TLC2543. The method of interfacing to this chip is a combination of single-bit writes via board registers and synchronous clocked serial access via the CPU Card's Serial Port B, which is extended across all eight slots. In addition, a serial EEPROM is installed on the A/D Converter Card to store the calibration constants.
Table D-4. A/D Converter Card Control Registers
Address 0x0 Data Bits Write D7-D0 Value D7-D4 selects input channel, D3-D0 selects conversion channel 0 0x0 Read D1 1 0 0x1 Write D0 1 0 0x2 Write D0 1 0 0x3 Write D0 1 0 0x0 Read D2 1 EEPROM busy EEPROM data line high EEPROM acknowledge signal EEPROM clock line high EEPROM data line low Disable A/D conversion EEPROM clock line low A/D converter busy Enable A/D conversion Description Load A/D converter with data byte A/D converter end of conversion signal
APPENDICES
176
Smart Star (SR9000)
D.3 D/A Converter Card Channel Layout
The D/A Converter Card contains four two-channel 12-bit D/A converters, TLV5618, to produce 8 analog output channels. Each channel is accessed by the slot, channel and device addressing scheme. The D/A Converter Card also has an EEPROM to store calibration constants.
Table D-5. D/A Converter Card Control Registers
Address Data Bits 0 D0 1 D1 D2 D3 0x0 D4 D5 D6 1 D7 X EEPROM clock line high EEPROM data line 0 0 0 D/A converter chip select channels 4 and 5 D/A converter chip select channels 6 and 7 EEPROM clock line low X 0 0 D/A converter clock line high D/A converter data input line D/A converter chip select channels 0 and 1 D/A converter chip select channels 2 and 3 Value Description D/A converter clock line low
External reads and writes (/IORD and /IOWR) control the data direction.
User's Manual
177
APPENDICES
D.4 Relay Card Channel Layout
The Relay Card layout is complemented by the standard Rabbit method of minimizing chip layout while adding channel arrangement flexibility. In particular, the nibble-wise layout of the relay channels requires fewer chips if fewer channels are desired. This is a common feature on Rabbit products and should not surprise most users. The relay channel layout is straightforward.
Table D-6. Relay Card Channel Mapping
Local Board Address 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 SR9500 Relay Channels REL0 REL1 REL2 REL3 REL4 REL5 -- -- SR9510 Relay Channels REL0 REL1 REL2 REL3 REL4 REL5 REL6 REL7
APPENDICES
178
Smart Star (SR9000)
INDEX
A
A/D Converter Card function calls ..................... 92 anaIn .............................. 94 anaInCalib ..................... 93 anaInEERd .................... 92 anaInEEWr .................... 93 anaInmAmps ................. 95 anaInVolts ..................... 94 anaLoadCalib ................ 92 anaSaveCalib ................. 92 models ............................... 87 sample programs ............... 91 analog input conditioning circuit ................................. 88 CPU Card attaching to backplane ...... 18 dimensions ........................ 62 digital outputs connecting a load .............. 78 sinking or sourcing jumper settings .............. 78 dimensions A/D Converter Card .......... 96 backplane .......................... 60 CPU Card .......................... 62 D/A Converter Card ........ 113 Digital I/O Card ................ 82 field wiring terminals ...... 129 LCD/keypad module ....... 131 LCD/keypad template ..... 134 Relay Cards ..................... 123 Dynamic C ............................ 12 add-on modules ................. 45 COM port .......................... 23 libraries . 47, 79, 91, 106, 121 running sample programs ....................... 91, 106, 121 standard features ............... 44 debugging ...................... 44 starting .............................. 23 telephone-based technical support .................... 12, 45 upgrades and patches ........ 45
D
D/A Converter Card analog outputs enabling ....................... 105 circuit .............................. 102 function calls ................... 107 anaLoadCalib .............. 109 anaOut ......................... 110 anaOutCalib ................ 108 anaOutDisable ..... 105, 107 anaOutEERd ............... 107 anaOutEEWr ............... 112 anaOutEnable ...... 105, 107 anaOutmAmps ............ 111 anaOutVolts ................ 111 anaSaveCalib ............... 109 models ............................. 101 sample programs ............. 106 digital I/O SMODE0 .......................... 35 SMODE1 .......................... 35 Digital I/O Card .................... 71 banks Bank 2 configurations ... 75 locations ........................ 74 digital outputs digBankOut ................... 81 digOut ........................... 81 function calls ................. 81 function calls ..................... 80 digBankIn ...................... 80 digIn .............................. 80 locations of I/O banks ....... 74 sample programs ............... 79 digital inputs ......................... 76 pulldown configuration ..... 76 pullup configuration .......... 76 pullup/pulldown jumper settings .............................. 76
B
backplane dimensions ........................ 60 battery replacing the backup battery .............................. 167 battery backup circuit ......... 167 battery connections ............. 166 battery life ........................... 166
C
CE compliance ................ 13, 14 backplanes and cards not CEcomplaint ...................... 14 CE-compliant backplanes and cards .............................. 13 design guidelines ............... 15 LCD/keypad module ......... 13 chip select circuit ................ 171 clock doubler ........................ 41 conformal coating ................. 64 connections Ethernet cable ................... 51 power supply ..................... 19 programming cable ........... 20
E
EMI spectrum spreader feature . 41 Ethernet cables ...................... 51 Ethernet connections ............. 51 10Base-T Ethernet card .... 51 Ethernet hub ...................... 51 steps .................................. 51 Ethernet port handling EMI and noise .... 36 pinout ................................ 36 exclusion zone ...................... 68
User's Manual
179
F
features ....................................9 A/D Converter Card ..........87 D/A Converter Card ........101 Digital I/O Card .................71 Relay Cards .....................117 field wiring terminals ....11, 128 guide to FWT selection ................................11, 128 A/D Converter Card ......89 D/A Converter Card ....104 Digital I/O Card .............73 Relay Cards .................119 installation .......................128 positioning on I/O card ....128 flash memory lifetime write cycles ..........43 font and bitmap converter ...163 FWT. See field wiring terminals
K
keypad template ..................134 removing and inserting label ................................134
L
LCD/keypad module .............11 contrast adjustment ..........133 dimensions .......................131 header pinout ...................135 I/O address assignments ..135 keypad function calls keyConfig ................160 keyGet ......................161 keyInit ......................160 keypadDef ................162 keyProcess ...............161 keyScan ....................162 keyUnget ..................161 keypad template ..............134 LCD display function calls glBackLight .............144 glBlankScreen ..........145 glBlock ....................145 glBuffLock ..............152 glBuffUnlock ...........152 glDispOnOff ............144 glDown1 ..................155 glFillCircle ...............148 glFillPolygon ...........147 glFillScreen ..............145 glFillVPolygon ........147 glFontCharAddr .......149 glGetBrushType ......153 glGetPfStep ..............150 glHScroll ..................155 glInit ........................144 glLeft1 .....................154 glPlotCircle ..............148 glPlotDot ..................153 glPlotLine ................153 glPlotPolygon ..........146 glPlotVPolygon .......146 glPrintf .....................151 glPutChar .................151 glPutFont .................150 glRight1 ...................154 glSetBrushType .......152 glSetContrast ...........145 glSetPfStep ..............150
glSwap .....................152 glUp1 .......................154 glVScroll ..................156 glXFontInit ......149, 163 glXPutBitmap ..156, 163 glXPutFastmap ........157 TextCursorLocation .158 TextGotoXY ............158 TextPrintf .................159 TextPutChar .............159 TextWindowFrame ..157 LEDs function calls ...............143 ledOut ......................143 mounting instructions ......136 removing and inserting keypad label .............................134 sample programs .............141 versions ...........................131
H
headers JP1 .....................................34
M
memory .................................38 flash EPROM configuration for different sizes ..........38 SRAM configuration for different sizes ................38 models A/D Converter Card ..........87 D/A Converter Card ........101 Digital I/O Card .................71 Relay Cards .....................117 mounting instructions LCD/keypad module .......136
I
I/O address assignments LCD/keypad module .......135 I/O cards attaching to backplane .......25 installation CPU Card ..........................18 field wiring terminals ......128 I/O cards ............................25 IP addresses how to set ..........................53 how to set PC IP address ...54
O
options LCD/keypad module .........11
J
jumper configurations ...........65 JP1 (RS-485 bias and termination resistors) ...........34, 65 JP2 (flash memory bank select) ............................38 JP5 (flash memory bank select) ............................65 jumper locations ................64 jumper settings digital inputs pullup/pulldown .............76 digital outputs sinking or sourcing ........78
P
pinout A/D Converter Card user interface ........................88 backplane SLOT 0-SLOT 6 .......................................31 CPU Card (serial communication) ...............................32 D/A Converter Card user interface ......................103 Digital I/O Card .................72 digital inputs ..................75 digital outputs ................77 user interface .................72 Ethernet port ......................36
180
Smart Star (SR9000)
pinout (continued) FWT A/D Converter Card ...... 89 D/A Converter Card .... 104 Digital I/O Card ............ 73 Relay Cards ................. 119 LCD/keypad module ....... 135 Relay Cards ..................... 118 power distribution A/D Converter Card .......... 90 backplane .......................... 29 CPU Card .......................... 29 D/A Converter Card ........ 105 Digital I/O Card ................ 77 Relay Cards ..................... 120 Smart Star system ............. 30 power management ............. 165 power supplies backup-battery circuit ..... 167 battery backup ................. 166 battery backup circuit ...... 167 battery life ....................... 166 chip select circuit ............ 171 VRAM switch ................. 168 power supply ......................... 12 programming flash vs. RAM ................... 43 programming cable ..... 12, 20 programming port ............. 35 programming cable ... 12, 20, 37 PROG connector ......... 20, 37 switching between Program Mode and Run Mode .... 37 programming port ................. 35
S
sample programs ................... 46 A/D Converter Card .......... 91 SSTARAD1.C ............... 91 SSTARAD2.C ............... 91 SSTARAD3.C ............... 91 D/A Converter Card ........ 106 ANAVOUT.C ............. 106 SSDAC1.C .................. 106 SSDAC2.C .................. 106 SSDAC3.C .................. 106 SSDAC4.C .................. 106 Digital I/O Card ................ 79 SSTARIO.C .................. 79 how to set IP address ........ 53 LCD/keypad module ....... 141 ALPHANUN.C ........... 141 COFTERMA.C ........... 141 DISPPONG.C ............. 141 DKADEMO1.C .......... 141 FUN.C ......................... 141 KEYBASIC.C ..... 134, 141 KEYMENU.C ............. 141 LED.C ......................... 141 SCROLLING.C .......... 141 TEXT.C ....................... 141 LCD/keypad module (with TCP/IP) MBOXDEMO.C ... 56, 142 TCP_RESPOND.C 56, 142 TCPSEND.C ......... 56, 142 PONG.C ............................ 24 Relay Cards ..................... 121 SSTARRLY.C ............ 121 serial communication MASTER.C ................... 46 SLAVE.C ...................... 46 SSTAR232.C ................ 46 SSTAR5W.C ................. 46 TCP/IP .............................. 53 PINGME.C .................... 55 SMTP.C ........................ 55 SSI.C ............................. 55 SSI2.C ........................... 55 serial communication function calls ..................... 49 serDRS485Rx ............... 50 serDRS485Tx ................ 49 serMode ......................... 49 programming port ............. 35 RS-232 description ........... 32 RS-485 description ........... 33
R
Relay Cards function calls ................... 122 relayOut ....................... 122 sample programs ............. 121 relay circuit configurations . 118 diodes .............................. 118 snubbers .......................... 118 reset ....................................... 21 reset generator ................. 169 RS-232 .................................. 32 RS-485 network .................... 33 termination and bias resistors ................................ 34
RS-485 network ................ 33 RS-485 termination and bias resistors ......................... 34 slot address layout .............. 173 A/D Converter Card ........ 176 D/A Converter Card ........ 177 Digital I/O Card .............. 175 Relay Cards ..................... 178 Smart Star bus reset function calls ..................... 48 Smart Star initialization function calls ..................... 48 SMRTSTAR.LIB function calls brdInit ............................ 48 brdResetBus .................. 48 software .... 47, 79, 91, 106, 121 libraries . 47, 79, 91, 106, 121 PACKET.LIB ................ 49 RS232.LIB .................... 49 SMRTSTAR.LIB ......... 47, 79, 91, 106, 121 specifications ........................ 59 A/D Converter Card dimensions .................... 96 electrical ........................ 97 temperature ................... 97 backplane dimensions .................... 60 electrical ........................ 61 temperature ................... 61 CPU Card dimensions .................... 62 electrical ........................ 63 mechanical .................... 63 temperature ................... 63 D/A Converter Card dimensions .................. 113 electrical ...................... 114 temperature ................. 114 Digital I/O Card dimensions .................... 82 electrical ........................ 83 temperature ................... 83 exclusion zone .................. 68 field wiring terminals dimensions .................. 129 LCD/keypad module dimensions .................. 131 electrical ...................... 132 header footprint ........... 132 mechanical .................. 132 relative pin 1 locations 132 temperature ................. 132
User's Manual
181
specifications (continued) Relay Cards dimensions ...................123 electrical ......................124 temperature ..................124 spectrum spreader .................41 subsystems ............................32
T
TCP/IP connections additional resources ...........57 Tool Kit .................................12 DC power supply ...............12 Dynamic C software ..........12 field wiring terminal ..........12 programming cable ............12 software .............................12 User's Manual ...................12
W
watchdog timeout function calls chkWDTO ...................169
182
Smart Star (SR9000)
SCHEMATICS
090-0129 CPU Card (SR9150) Schematic
www.rabbit.com/documentation/schemat/090-0129.pdf
090-0143 Backplane (SR9010) Schematic
www.rabbit.com/documentation/schemat/090-0143.pdf
090-0130 Backplane (SR9050) Schematic
www.rabbit.com/documentation/schemat/090-0130.pdf
090-0101 Digital I/O Card-Sinking (SR9200) Schematic
www.rabbit.com/documentation/schemat/090-0101.pdf
090-0118 Digital I/O Card-Sourcing (SR92x5) Schematic
www.rabbit.com/documentation/schemat/090-0118.pdf
090-0086 A/D Converter Card (SR9300) Schematic
www.rabbit.com/documentation/schemat/090-086.pdf
090-0121 D/A Converter Card (SR9400) Schematic
www.rabbit.com/documentation/schemat/090-0121.pdf
090-0098 6-Relay Card (SR9500) Schematic
www.rabbit.com/documentation/schemat/090-0098.pdf
090-0108 8-Relay Card (SR9510) Schematic
www.rabbit.com/documentation/schemat/090-0108.pdf
090-0102 FWT18 Schematic
www.rabbit.com/documentation/schemat/090-0102.pdf
090-0106 FWT18R Schematic
www.rabbit.com/documentation/schemat/090-0106.pdf
090-0103 FWT27 Schematic
www.rabbit.com/documentation/schemat/090-0103.pdf
User's Manual
183
090-0125 LCD/Keypad Module Schematic
www.rabbit.com/documentation/schemat/090-0125.pdf
090-0128 Programming Cable Schematic
www.rabbit.com/documentation/schemat/090-0128.pdf
You may use the URL information provided above to access the latest schematics directly.


▲Up To Search▲   

 
Price & Availability of 101-0512

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X